accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [accumulo] keith-turner commented on a change in pull request #1032: fixes #1031 fix concurrency bug and remove unused code
Date Thu, 14 Mar 2019 17:02:09 GMT
keith-turner commented on a change in pull request #1032: fixes #1031 fix concurrency bug and
remove unused code
URL: https://github.com/apache/accumulo/pull/1032#discussion_r265671719
 
 

 ##########
 File path: server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
 ##########
 @@ -1989,7 +1985,9 @@ private CompactionStats _majorCompact(MajorCompactionReason reason)
           CompactionEnv cenv = new CompactionEnv() {
             @Override
             public boolean isCompactionEnabled() {
-              return Tablet.this.isCompactionEnabled();
+              // avoid calling isClosing() because its synchronized and this is called frequently
in
+              // compaction
+              return closeState != CloseState.CLOSING;
 
 Review comment:
   One thing  Iike about this change was that it does nott matter if isClosing was sync or
not, its very explicit about what it requires.  If isClosing were made unsync a comment could
be added to it saying that it should not be made sync.  I suspect in the past that isClosing
was not a sync method, but I didn't do the research to confirm this.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message