You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Ray Mattingly (Jira)" <ji...@apache.org> on 2023/10/11 13:03:00 UTC

[jira] [Created] (HBASE-28146) ServerManager's rsAdmins map should be thread safe

Ray Mattingly created HBASE-28146:
-------------------------------------

             Summary: ServerManager's rsAdmins map should be thread safe
                 Key: HBASE-28146
                 URL: https://issues.apache.org/jira/browse/HBASE-28146
             Project: HBase
          Issue Type: Bug
    Affects Versions: 2.5.5
            Reporter: Ray Mattingly
            Assignee: Ray Mattingly


On 2.x [the ServerManager registers admins in a HashMap|https://github.com/apache/hbase/blob/branch-2/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java]. This can result in thread safety issues — we recently observed an exception which caused a region to be indefinitely stuck in transition until we could manually intervene. We saw the following exception in the HMaster logs:
{code:java}
2023-10-11 02:20:05.213 [RSProcedureDispatcher-pool-325] ERROR org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher: Unexpected error caught, this may cause the procedure to hang forever
    java.lang.ClassCastException: class java.util.HashMap$Node cannot be cast to class java.util.HashMap$TreeNode (java.util.HashMap$Node and java.util.HashMap$TreeNode are in module java.base of loader 'bootstrap')
        at java.util.HashMap$TreeNode.moveRootToFront(HashMap.java:1900) ~[?:?]
        at java.util.HashMap$TreeNode.treeify(HashMap.java:2016) ~[?:?]
        at java.util.HashMap.treeifyBin(HashMap.java:768) ~[?:?]
        at java.util.HashMap.putVal(HashMap.java:640) ~[?:?]
        at java.util.HashMap.put(HashMap.java:608) ~[?:?]
        at org.apache.hadoop.hbase.master.ServerManager.getRsAdmin(ServerManager.java:723){code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)