mnpoonia commented on code in PR #6789:
URL: https://github.com/apache/hbase/pull/6789#discussion_r2028172348


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:
##########
@@ -1826,6 +1828,19 @@ private Map<byte[], List<HStoreFile>> doClose(boolean 
abort, MonitoredTask statu
         LOG.error(msg);
         if (canAbort) {
           // If we failed to acquire the write lock, abort the server
+          // print all thread stacks which are still holding locks and are the 
cause of RS abort
+          for (Map.Entry<Thread, Boolean> rslocks : 
intrRegionLockHolders.entrySet()) {
+            Thread thread = rslocks.getKey();
+            LOG.warn(
+              "Aborting RS.Thread still holding lock: {} , interruptible: {} , 
Stack trace: {}",
+              thread, rslocks.getValue(), Threads.printStackTrace(thread));
+          }
+          for (Map.Entry<Thread, Boolean> rslocks : 
nonintrRegionLockHolders.entrySet()) {

Review Comment:
   I am thinking of how we can improve this piece of code. This seems very 
redundant.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to