horizonzy commented on code in PR #3843:
URL: https://github.com/apache/bookkeeper/pull/3843#discussion_r1142882891
##########
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:
Here we catch InterruptedException, the InterruptedException is thrown by
`forceWriteRequests.takeAll(localRequests)`.
So if it throws InterruptedException, that means we didn't read the data
from the queue. So we don't need to handle the data.
--
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]