Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions dev-support/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,23 @@
<Bug pattern="SC_START_IN_CTOR"/>
</Match>

<Match>
<!--
False positives, NettyRpcServer#start & SimpleRpcServer#start are already synchronized and
there is check to ensure single initialization of authTokenSecretMgr field.
Ignore the warning, see HBASE-25875.
!-->
<Or>
<And>
<Class name="org.apache.hadoop.hbase.ipc.NettyRpcServer"/>
<Method name="start"/>
</And>
<And>
<Class name="org.apache.hadoop.hbase.ipc.SimpleRpcServer"/>
<Method name="start"/>
</And>
</Or>
<Bug pattern="ML_SYNC_ON_UPDATED_FIELD"/>
</Match>

</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,12 @@ public synchronized void start() {
}
authTokenSecretMgr = createSecretManager();
if (authTokenSecretMgr != null) {
setSecretManager(authTokenSecretMgr);
authTokenSecretMgr.start();
// 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,12 @@ public synchronized void start() {
}
authTokenSecretMgr = createSecretManager();
if (authTokenSecretMgr != null) {
setSecretManager(authTokenSecretMgr);
authTokenSecretMgr.start();
// 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);
Expand Down