keith-turner commented on issue #1358: Fix race conditions with 
commitsInProgress counter
URL: https://github.com/apache/accumulo/pull/1358#issuecomment-531274741
 
 
   > For this particular PR it's still not clear to me why CommitSession.java 
needs to lock (block) the entire tablet to keep this internal count.
   
   Its not that the tablet is locked just to mutate this counter.  The tablet 
is locked because it is  reading/writing multiple variables that need to be 
considered together atomically (for example it needs to get a pointer to the 
correct commit session).  There are two places in the code where the lock is 
acquired and the count is mutated along with reading/writing other tablet 
state.  Below is link to those two places.
   
   
https://github.com/apache/accumulo/blob/40d954f22b22ff437b938c6bf3607298b30e1088/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java#L1179
   
   
https://github.com/apache/accumulo/blob/40d954f22b22ff437b938c6bf3607298b30e1088/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java#L1301

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to