You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HBASE-28113 Modify the way of acquiring the RegionStateNode lock in checkOnlineRegionsReport to tryLock (#5442)
* To prevent threads from being blocked by the lock of RegionStateNode, modify the way of acquiring the RegionStateNode lock in checkOnlineRegionsReport to tryLock.
Co-authored-by: lvhaiping.lhp <[email protected]>
Signed-off-by: Duo Zhang <[email protected]>
// So, we can get report that a region is CLOSED or SPLIT because a heartbeat
1420
+
// came in at about same time as a region transition. Make sure there is some
1421
+
// elapsed time so less false alarms.
1422
+
if (diff > lag) {
1423
+
LOG.warn("Reporting {} state does not match {} (time since last update={}ms)",
1424
+
serverName, regionNode, diff);
1425
+
}
1420
1426
}
1427
+
} finally {
1428
+
regionNode.unlock();
1421
1429
}
1422
-
} finally {
1423
-
regionNode.unlock();
1430
+
} else {
1431
+
LOG.warn(
1432
+
"Unable to acquire lock for regionNode {}. It is likely that another thread is currently holding the lock. To avoid deadlock, skip execution for now.",
0 commit comments