rakeshadr commented on code in PR #3379:
URL: https://github.com/apache/ozone/pull/3379#discussion_r867991202


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystemWithFSO.java:
##########
@@ -224,4 +225,19 @@ public void testDeleteVolumeAndBucket() throws IOException 
{
     Assert.assertTrue(deletes == prevDeletes + 1);
   }
 
+  @Test
+  public void testListStatusFSO() throws Exception {
+    Path parent = new Path(getBucketPath(), "testListStatusFSO");
+    for (int i = 0; i < 1300; i++) {
+      Path key = new Path(parent, "tempKey" + i);
+      ContractTestUtils.touch(getFs(), key);
+      // To add keys to the cache

Review Comment:
   @umamaheswararao @aswinshakil 
   >Only with rename, it keeping things in cache. It's good to know the 
differences
   
   Are you still seeing a table cache entry leaked in the latest code, with 
rename FSO operation ?
   
   _Details about the flushing and table cache cleanup logic:_ Hope this helps.
   
   step-1) Assume user performed `o3fs#rename(srcKey, dstKey)`;
   
   step-2) Then the call will reach OM server and will do rename metadata 
updation at OM : `OMKeyRenameRequest -> validateAndUpdateCache()`
   Here OM will update the keys and add these keys into TableCache.
   
   step-3) This is an async thread, which will do 
`OzoneManagerDoubleBuffer#flushTransactions()`
   Here it will add/update the DBTable and do TableCache cleanup by removing 
the flushed transaction Id.
   
   There are two reasons for seeing an item/key in TableCache:
   case-1) The entry is added to the TableCache and not yet flushed to DB. In 
reality the lifetime of a table cache entry is in between this petty small 
window.
   case-2) Bug situation: The cleanup of the tablecache is not done because of 
missing Table name in the response logic. This is a bug.
   For example, rename response class should have the DBTable names to be 
looked at and do the cleanup on flushing. If table name is not correctly 
mentioned, then that entry will not be removed and will exists in TableCache. 
This is a bug case.
   ```
   @CleanupTableInfo(cleanupTables = {FILE_TABLE, DIRECTORY_TABLE})
   public class OMKeyRenameResponseWithFSO extends OMKeyRenameResponse {
   ```



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