merlimat commented on code in PR #4760:
URL: https://github.com/apache/bookkeeper/pull/4760#discussion_r3142820574


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java:
##########
@@ -154,6 +154,12 @@ private void sendWriteRequest(List<BookieId> ensemble, int 
bookieIndex) {
     }
 
     boolean maybeTimeout() {
+        if (clientCtx == null) {

Review Comment:
   I don't think this would solve the race condition completely, since it could 
be set to null before the next read on line 163. 
   
   Better approach would be (even without the `volatile`) to assign to local 
variable and the the null there.  Still wouldn't address whether it's safe to 
call `timeoutQuorumWait()` if it was already recycled.



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