Galsza commented on code in PR #5490:
URL: https://github.com/apache/ozone/pull/5490#discussion_r1371628032


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/OMDBUpdatesHandler.java:
##########
@@ -153,8 +153,18 @@ private void processEvent(int cfIndex, byte[] keyBytes, 
byte[]
           }
         }
       } else if (action.equals(DELETE)) {
-        if (oldValue != null && !omUpdateEventValidator.isValidEvent(tableName,
-            oldValue, key, action)) {
+        if (null == oldValue) {
+          String keyStr = "";
+          if (key instanceof String) {
+            keyStr = (String) key;
+          }
+          LOG.info(

Review Comment:
   If this is a warning level log, this should be LOG.warn() instead.
   The WARNING !!! at the start of the log message is not needed.



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/OMDBUpdatesHandler.java:
##########
@@ -153,8 +153,18 @@ private void processEvent(int cfIndex, byte[] keyBytes, 
byte[]
           }
         }
       } else if (action.equals(DELETE)) {
-        if (oldValue != null && !omUpdateEventValidator.isValidEvent(tableName,
-            oldValue, key, action)) {
+        if (null == oldValue) {
+          String keyStr = "";
+          if (key instanceof String) {
+            keyStr = (String) key;
+          }
+          LOG.info(
+              "WARNING !!!, Value of Key: {} in table: {} should not be null " 
+
+                  "for DELETE event ", keyStr, tableName);

Review Comment:
   I think converting the key to string and the keyStr variable is not needed. 
You could use key.toString() here instead. 
(omUpdateEventValidator.isValidEvent() does exectly this a few lines later)



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