Skip to content

Commit

Permalink
Make flush threads daemon to allow jvm to exit if these threads are a…
Browse files Browse the repository at this point in the history
…ctive
  • Loading branch information
sfc-gh-psaha committed Jun 25, 2024
1 parent d2e7bb3 commit 6293c2c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ CompletableFuture<Void> flush(boolean isForce) {
private void createWorkers() {
// Create thread for checking and scheduling flush job
ThreadFactory flushThreadFactory =
new ThreadFactoryBuilder().setNameFormat("ingest-flush-thread").build();
new ThreadFactoryBuilder().setNameFormat("ingest-flush-thread").setDaemon(true).build();
this.flushWorker = Executors.newSingleThreadScheduledExecutor(flushThreadFactory);
this.flushWorker.scheduleWithFixedDelay(
() -> {
Expand Down

0 comments on commit 6293c2c

Please sign in to comment.