nandakumar131 commented on code in PR #4918:
URL: https://github.com/apache/ozone/pull/4918#discussion_r1236461687


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -1958,15 +1959,17 @@ private void addOMNodeToPeers(String newOMNodeId) 
throws IOException {
 
         if (newOMNodeDetails == null) {
           // If new node information is not present in the newly loaded
-          // configuration also, throw an exception
+          // configuration also, throw an exception.
+          // This case can also come when we have decommissioned a node and
+          // ratis will apply previous transactions to add that node back.
           throw new IOException("There is no OM configuration for node ID "
               + newOMNodeId + " in ozone-site.xml.");

Review Comment:
   Instead of throwing `IOException` here and catching it in the below `catch` 
block, log an `error` message here and `return`.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -1958,15 +1959,17 @@ private void addOMNodeToPeers(String newOMNodeId) 
throws IOException {
 
         if (newOMNodeDetails == null) {
           // If new node information is not present in the newly loaded
-          // configuration also, throw an exception
+          // configuration also, throw an exception.
+          // This case can also come when we have decommissioned a node and
+          // ratis will apply previous transactions to add that node back.
           throw new IOException("There is no OM configuration for node ID "
               + newOMNodeId + " in ozone-site.xml.");
         }
       }
     } catch (IOException e) {
       LOG.error("{}: Couldn't add OM {} to peer list.", getOMNodeId(),
           newOMNodeId);
-      exitManager.exitSystem(1, e.getLocalizedMessage(), e, LOG);
+      return;

Review Comment:
   Doing `return` here will affect all the other `IOExceptions` as well, we 
should avoid doing this.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to