fix BatchExecutorQueue bug (#11927)
Co-authored-by: earthchen <earthchen1996@gmail.com>
This commit is contained in:
parent
89e271408d
commit
88853e0177
|
|
@ -62,7 +62,7 @@ public class BatchExecutorQueue<T> {
|
|||
boolean flushedOnce = false;
|
||||
while ((item = snapshot.poll()) != null) {
|
||||
if (snapshot.size() == 0) {
|
||||
i = 0;
|
||||
flushedOnce = false;
|
||||
break;
|
||||
}
|
||||
if (i == chunkSize) {
|
||||
|
|
@ -74,7 +74,7 @@ public class BatchExecutorQueue<T> {
|
|||
i++;
|
||||
}
|
||||
}
|
||||
if ((i != 0 || !flushedOnce) && item != null) {
|
||||
if (!flushedOnce && item != null) {
|
||||
flush(item);
|
||||
}
|
||||
} finally {
|
||||
|
|
|
|||
Loading…
Reference in New Issue