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 2020/01/02 18:29:02 UTC

[GitHub] [hbase] bharathv commented on a change in pull request #979: HBASE-23632 DeadServer cleanup

bharathv commented on a change in pull request #979: HBASE-23632 DeadServer cleanup
URL: https://github.com/apache/hbase/pull/979#discussion_r362568203
 
 

 ##########
 File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/DeadServer.java
 ##########
 @@ -124,14 +94,11 @@ public synchronized boolean areDeadServersInProgress() {
   /**
    * Adds the server to the dead server list if it's not there already.
    */
-  public synchronized void add(ServerName sn) {
+  synchronized void add(ServerName sn) {
     if (!deadServers.containsKey(sn)){
       deadServers.put(sn, EnvironmentEdgeManager.currentTime());
 
 Review comment:
   nit: use putIfAbsent()? Also may be rename method to addIfNotExists() to clarify intent? 

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


With regards,
Apache Git Services