hemantk-12 commented on code in PR #4230:
URL: https://github.com/apache/ozone/pull/4230#discussion_r1093584820


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOzoneSnapshotRestore.java:
##########
@@ -258,9 +259,24 @@ public void 
testRestoreSnapshotDifferentBucket(BucketLayout bucketLayoutTest)
     int volBucketKeyCount = keyCount(buck, snapshotKeyPrefix + keyPrefix);
     Assertions.assertEquals(5, volBucketKeyCount);
 
+    // Delete keys from the source bucket.

Review Comment:
   Problem is that RocksDB's seek operation doesn't 100% guarantee that item 
key is available. Tho we believe that it is. When we check if there is a 
directory for the key name, sometime it returns non-null response but in 
reality item doesn't exist.
   
[Here](https://github.com/apache/ozone/blob/d8765436c2bf76547973cc568f1648f1b1fe9fcb/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L1184),
 sometimes seek returns null and sometimes it return source bucket (which is 
wrong). When is returns source bucket, we create fake dir and return the 
response.
   
   I was unsure what should be the correct behavior for this so I went ahead to 
delete keys from source bucket for now as temporary fix. But we should revisit 
the `createFakeDirIfShould` logic and fix it there. This is the original PR: 
https://github.com/apache/ozone/pull/3774/files 



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