bookkeeper-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] athanatos commented on a change in pull request #1646: Use immutable metadata in LedgerHandle
Date Tue, 11 Sep 2018 01:19:56 GMT
athanatos commented on a change in pull request #1646: Use immutable metadata in LedgerHandle
URL: https://github.com/apache/bookkeeper/pull/1646#discussion_r216521270
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
 ##########
 @@ -138,7 +139,8 @@
      */
     public static final long INVALID_LEDGER_ID = -0xABCDABCDL;
 
-    final AtomicInteger blockAddCompletions = new AtomicInteger(0);
+    final Object metadataLock = new Object();
 
 Review comment:
   I'm guessing that the reason for this lock is to prevent write completion events from contending
on the LedgerHandle object with write initiation?  Is that contention really enough of a problem
for this to be a measurable win?  If so, I think that the state protected by this lock (changingEnsemble,
delayedWriteFailedBookies) should be moved into an actual object with descriptive methods.
 As it is, it's a bit tough to infer the update rules.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message