HBASE-25809 [branch-1] TestAtomicOperation.testMultiRowMutationMultiThreads deadlock (#3198)

Signed-off-by: Reid Chan <reidchan@apache.org>
This commit is contained in:
Andrew Purtell 2021-04-23 18:57:02 -07:00 committed by GitHub
parent c1aff55388
commit 38b21f44ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -8980,7 +8980,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
// cost of some potential blocking on the object monitor that would not happen if
// we had computeIfPresent. (The implementation of this method on branch-2 and up
// uses computeIfPresent.)
synchronized (this) {
synchronized (regionLockHolders) {
Thread currentThread = Thread.currentThread();
Boolean value = regionLockHolders.get(currentThread);
if (value != null) {
@ -8999,7 +8999,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
// cost of some potential blocking on the object monitor that would not happen if
// we had computeIfPresent. (The implementation of this method on branch-2 and up
// uses computeIfPresent.)
synchronized (this) {
synchronized (regionLockHolders) {
Thread currentThread = Thread.currentThread();
Boolean value = regionLockHolders.get(currentThread);
if (value != null) {