albertogpz commented on a change in pull request #4928: URL: https://github.com/apache/geode/pull/4928#discussion_r423014670
########## File path: geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java ########## @@ -1282,22 +1278,89 @@ public List peek(int batchSize, int timeToWait) throws InterruptedException, Cac Thread.currentThread().interrupt(); break; } - continue; } } + + if (batch.size() > 0) { + peekEventsFromIncompleteTransactions(batch, incompleteTransactionsInBatch, prQ); + } + if (isDebugEnabled) { logger.debug("{}: Peeked a batch of {} entries. The size of the queue is {}. localSize is {}", this, batch.size(), size(), localSize()); } + if (batch.size() == 0) { blockProcessorThreadIfRequired(); } return batch; } + private boolean stopPeekingDueToTime(long currentTime, int timeToWait, long end) { Review comment: Good point ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org