mirror of https://github.com/apache/druid.git
Fix race condition in HttpPostEmitter (#13237)
This commit is contained in:
parent
c83115e4e1
commit
9763bf8050
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue