bharatviswa504 commented on a change in pull request #856:
URL: https://github.com/apache/hadoop-ozone/pull/856#discussion_r432116511
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerDoubleBuffer.java
##########
@@ -173,17 +196,19 @@ private void flushTransactions() {
flushedTransactionsSize);
}
- long lastRatisTransactionIndex =
- readyBuffer.stream().map(DoubleBufferEntry::getTrxLogIndex)
- .max(Long::compareTo).get();
-
- List<Long> flushedEpochs =
- readyBuffer.stream().map(DoubleBufferEntry::getTrxLogIndex)
- .sorted().collect(Collectors.toList());
+ // When non-HA do this step here, as the sorted is not require in
+ // flush to DB. As in non-HA We want to complete futures as quick
+ // as possible after flush to DB, to release rpc handler threads.
+ if (!isRatisEnabled) {
Review comment:
Some time, we see this list grow up to 100-300. And for non-HA, all rpc
handlers are blocked on flush futures, intention here is does not want to spend
time on unnecessary operations and make the flush futures complete and unblock
rpc handlers.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]