Skip to content

Commit 58dca69

Browse files
authored
update row lock comments apache#1364 (apache#1380)
1 parent 840fe43 commit 58dca69

File tree

1 file changed

+4
-0
lines changed
  • server/tserver/src/main/java/org/apache/accumulo/tserver

1 file changed

+4
-0
lines changed

server/tserver/src/main/java/org/apache/accumulo/tserver/RowLocks.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434

3535
class RowLocks {
3636

37+
// The compute function in Concurrent Hash Map supports atomic execution of the remapping function
38+
// and will only execute it once. Properly computing the reference counts relies on this specific
39+
// behavior. Not all concurrent map implementations have the desired behavior. For example
40+
// ConcurrentSkipListMap.compute is not atomic and may execute the function multiple times.
3741
private final Map<ByteSequence,RowLock> rowLocks = new ConcurrentHashMap<>();
3842

3943
static class RowLock {

0 commit comments

Comments
 (0)