lhotari commented on code in PR #4234:
URL: https://github.com/apache/bookkeeper/pull/4234#discussion_r1532204972
##########
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/MockBookKeeperTestCase.java:
##########
@@ -303,8 +303,12 @@ protected void suspendBookieForceLedgerAcks(BookieId
address) {
}
protected void resumeBookieWriteAcks(BookieId address) {
- suspendedBookiesForForceLedgerAcks.remove(address);
- List<Runnable> pendingResponses =
deferredBookieForceLedgerResponses.remove(address);
+ List<Runnable> pendingResponses;
+ synchronized (address) {
Review Comment:
I guess it makes sense since it would prevent the possible data race later,
in the other location where changes are made. Perhaps adding a code comment
would be helpful.
--
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]