ashishkumar50 commented on code in PR #5051:
URL: https://github.com/apache/ozone/pull/5051#discussion_r1261170157


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -1045,6 +1014,17 @@ private <T> boolean isKeyPresentInTable(String keyPrefix,
         // Case 1: We found an entry, but no cache entry.
         if (cacheValue == null) {
           // we found at least one key with this prefix.
+          // There is chance cache value flushed when
+          // we iterate through the table.
+          // Check in table whether it is deleted or still present.
+          if (table.getIfExist(kv.getKey()) == null) {
+            if (!keyIter.hasNext()) {
+              break;
+            }
+            kv = keyIter.next();
+            continue;
+          }

Review Comment:
   Thanks for the suggestion, Updated.



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