You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by ab...@apache.org on 2022/10/20 08:10:38 UTC

[druid] branch master updated: Fix race condition in HttpPostEmitter (#13237)

This is an automated email from the ASF dual-hosted git repository.

abhishek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 9763bf8050 Fix race condition in HttpPostEmitter (#13237)
9763bf8050 is described below

commit 9763bf8050a636ab4781c1b71539b6c0e089120b
Author: Abhishek Agarwal <14...@users.noreply.github.com>
AuthorDate: Thu Oct 20 13:40:25 2022 +0530

    Fix race condition in HttpPostEmitter (#13237)
---
 .../org/apache/druid/java/util/emitter/core/HttpPostEmitter.java     | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/core/src/main/java/org/apache/druid/java/util/emitter/core/HttpPostEmitter.java b/core/src/main/java/org/apache/druid/java/util/emitter/core/HttpPostEmitter.java
index 7ec2a1e1af..fd2387d977 100644
--- a/core/src/main/java/org/apache/druid/java/util/emitter/core/HttpPostEmitter.java
+++ b/core/src/main/java/org/apache/druid/java/util/emitter/core/HttpPostEmitter.java
@@ -534,11 +534,6 @@ public class HttpPostEmitter implements Flushable, Closeable, Emitter
         Object batch = concurrentBatch.get();
         if (batch instanceof Batch) {
           ((Batch) batch).sealIfFlushNeeded();
-        } else {
-          // batch == null means that HttpPostEmitter is terminated. Batch object might also be a Long object if some
-          // thread just failed with a serious error in onSealExclusive(). In this case we don't want to shutdown
-          // the emitter thread.
-          needsToShutdown = batch == null;
         }
       }
       return needsToShutdown;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org