You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/09/11 13:35:55 UTC

[GitHub] [accumulo] keith-turner commented on a change in pull request #1354: Remove synchronization and use AtomicLong

keith-turner commented on a change in pull request #1354: Remove synchronization and use AtomicLong
URL: https://github.com/apache/accumulo/pull/1354#discussion_r323242732
 
 

 ##########
 File path: server/master/src/main/java/org/apache/accumulo/master/MasterTime.java
 ##########
 @@ -104,7 +105,7 @@ public void run() {
       case UNLOAD_METADATA_TABLETS:
       case UNLOAD_ROOT_TABLET:
         try {
-          zk.putPersistentData(zPath, Long.toString(System.nanoTime() + skewAmount).getBytes(UTF_8),
+          zk.putPersistentData(zPath, Long.toString(System.nanoTime() + skewAmount.get()).getBytes(UTF_8),
 
 Review comment:
   It does not seem like this change introduces any lock contention, its now reading from a volatile which seems like an improvement. 

----------------------------------------------------------------
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