eolivelli commented on a change in pull request #3110:
URL: https://github.com/apache/bookkeeper/pull/3110#discussion_r828830658
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java
##########
@@ -110,6 +110,7 @@
@Override
public void close() {
+ complete.set(true);
Review comment:
Now that we have the `writeSet.recycle();` block above we could go back
to compareAndSet()
What about this ?
```
if (complete.compareAndSet(false, true)) {
writeSet.recycle();
}
```
This way:
- we do writeSet.recycle(); only if complete is "false"
- eventually complete will be "true" in any case
--
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]