wenbingshen commented on code in PR #4713:
URL: https://github.com/apache/bookkeeper/pull/4713#discussion_r2894738643
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingWriteLacOp.java:
##########
@@ -86,24 +87,26 @@ void initiate(ByteBufList toSend) {
}
@Override
- public void writeLacComplete(int rc, long ledgerId, BookieId addr, Object
ctx) {
+ public synchronized void writeLacComplete(int rc, long ledgerId, BookieId
addr, Object ctx) {
int bookieIndex = (Integer) ctx;
+ // We got response.
+ receivedResponseSet.clear(bookieIndex);
+
if (completed) {
+ maybeRecycle();
return;
}
if (BKException.Code.OK != rc) {
lastSeenError = rc;
}
- // We got response.
- receivedResponseSet.clear(bookieIndex);
-
if (rc == BKException.Code.OK) {
if (ackSet.completeBookieAndCheck(bookieIndex) && !completed) {
completed = true;
cb.addLacComplete(rc, lh, ctx);
Review Comment:
@lhotari Currently, the `addLacComplete` implementation only print log. I
think we can maintain the status quo.
--
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]