ArafatKhan2198 commented on code in PR #5043:
URL: https://github.com/apache/ozone/pull/5043#discussion_r1262261172


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/OMDBUpdatesHandler.java:
##########
@@ -127,10 +129,24 @@ private void processEvent(int cfIndex, byte[] keyBytes, 
byte[]
 
       if (action == PUT) {
         final Object value = 
cf.getValueCodec().fromPersistedFormat(valueBytes);
+
+        // If the updated value is not valid for this event, we skip it.
+        if (!omUpdateEventValidator.isValidEvent(tableName, value, key,
+            action)) {
+          return;
+        }
+
         builder.setValue(value);
         // If a PUT operation happens on an existing Key, it is tagged
         // as an "UPDATE" event.
         if (oldValue != null) {
+
+          // If the oldValue is not valid for this event, we skip it.
+          if (!omUpdateEventValidator.isValidEvent(tableName, oldValue, key,
+              action)) {
+            return;
+          }
+

Review Comment:
   Done!



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