horizonzy commented on code in PR #3843:
URL: https://github.com/apache/bookkeeper/pull/3843#discussion_r1143212297


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java:
##########
@@ -512,16 +507,8 @@ public void run() {
                 } catch (InterruptedException e) {
                     Thread.currentThread().interrupt();
                     LOG.info("ForceWrite thread interrupted");
-                    // close is idempotent
-                    if (!localRequests.isEmpty()) {
-                        ForceWriteRequest req = 
localRequests.get(localRequests.size() - 1);
-                        req.shouldClose = true;
-                        req.closeFileIfNecessary();
-                    }

Review Comment:
   Maybe not, only the `forceWriteRequests.takeAll(localRequests)` throw the 
InterruptedException. If it throw InterruptedException, we didn't have data to 
flush.



-- 
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]

Reply via email to