horizonzy commented on code in PR #3837:
URL: https://github.com/apache/bookkeeper/pull/3837#discussion_r1129030884
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java:
##########
@@ -499,6 +502,10 @@ public void run() {
journalStats.getForceWriteGroupingCountStats()
.registerSuccessfulValue(numReqInLastForceWrite);
+ if (requestProcessor != null) {
Review Comment:
Here we trigger all channels to flush `pendingSendResponses`, shall we only
pick the requestHandler which is written to the logFile to flush
`pendingSendResponses`, it may reduce the unnecessary iteration in the loop.
```
public void flushPendingResponses() {
for (Channel c : allChannels) {
c.pipeline().fireUserEventTriggered(BookieRequestHandler.EVENT_FLUSH_ALL_PENDING_RESPONSES);
}
}
```
If there are 1000 channels, maybe only 2 channels need to flush
`pendingSendResponses`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]