dlg99 commented on a change in pull request #2962:
URL: https://github.com/apache/bookkeeper/pull/2962#discussion_r777747292



##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
##########
@@ -509,7 +510,7 @@ public void run() {
                             // queue will benefit from this force write - post 
a marker prior to issuing
                             // the flush so until this marker is encountered 
we can skip the force write
                             if (enableGroupForceWrites) {
-                                
forceWriteRequests.put(createForceWriteRequest(req.logFile, 0, 0, null, false, 
true));
+                                forceWriteMarkerSent = 
forceWriteRequests.offer(createForceWriteRequest(req.logFile, 0, 0, null, 
false, true));

Review comment:
       consider logging and incrementing a counter (for 
monitoring/alerting/troubleshooting) if forceWriteMarkerSent is false.

##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
##########
@@ -509,7 +510,7 @@ public void run() {
                             // queue will benefit from this force write - post 
a marker prior to issuing
                             // the flush so until this marker is encountered 
we can skip the force write
                             if (enableGroupForceWrites) {
-                                
forceWriteRequests.put(createForceWriteRequest(req.logFile, 0, 0, null, false, 
true));
+                                forceWriteMarkerSent = 
forceWriteRequests.offer(createForceWriteRequest(req.logFile, 0, 0, null, 
false, true));

Review comment:
       createForceWriteRequest uses pool; if offer failed we need to recycle 
the request to avoid leak.




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