You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/05/11 16:13:27 UTC

[GitHub] [hbase] pankaj72981 commented on pull request #3250: HBASE-25875 RegionServer failed to start due to IllegalThreadStateException in AuthenticationTokenSecretManager.start

pankaj72981 commented on pull request #3250:
URL: https://github.com/apache/hbase/pull/3250#issuecomment-838765723


   > LGTM. After fixing the spot bugs!
   
   Spotbugs warn looks like a false positive case which will never happen technically, as multiple thread can't  call NettyRpcServer#start concurrently (start() is synchronized) and we have a check whether NettyRpcServer started before creating a new AuthenticationTokenSecretManager instance.
   
   {code}
     @Override
     public synchronized void start() {
       if (started) {
         return;
       }
       authTokenSecretMgr = createSecretManager();
       if (authTokenSecretMgr != null) {
         // Start AuthenticationTokenSecretManager in synchronized way to avoid race conditions in
         // LeaderElector start. See HBASE-25875
         synchronized (authTokenSecretMgr) {
           setSecretManager(authTokenSecretMgr);
           authTokenSecretMgr.start();
         }
       }
       this.authManager = new ServiceAuthorizationManager();
       HBasePolicyProvider.init(conf, authManager);
       scheduler.start();
       started = true;
     }
     {code}


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org