whbing commented on PR #5170:
URL: https://github.com/apache/ozone/pull/5170#issuecomment-1674303861

   LGTM Overall. Thanks ! Here's a minor suggestion from my perspective. 
   We can add test in `TestListKeysWithFSO` to compare the listKeys results of 
`legacyBucket` and `fsoBucket`. I've written a demo test in 
`TestListKeysWithFSO`:
   ```java
   private static void buildNameSpaceTree(OzoneBucket ozoneBucket)
         throws Exception {
       LinkedList<String> keys = new LinkedList<>();
       // ignore other codes    
       keys.add("/a1/b3/e3/e31.tx");
       keys.add("/a1/b3/e3/e31.tx1");
      // ignore other codes
       createKeys(ozoneBucket, keys);
     }
   
     @Test
     public void testListKeysWithValidStartKey() throws Exception {
       // case-10: keyPrefix corresponds an exist file and other file's prefix
       expectedKeys =
           getExpectedKeyList("a1/b3/e3/e31.tx", "", legacyOzoneBucket);
       checkKeyList("a1/b3/e3/e31.tx", "", expectedKeys, fsoOzoneBucket);
     }
   ```
   Result will be `Actual   :[a1/b3/e3/e31.tx, a1/b3/e3/e31.tx] ` without PR  
and `Actual   :[a1/b3/e3/e31.tx]` with this PR.
   Since the result from `fsoBucket` is not consistent with `legacybucket` in 
the above case (In fact, I'v  noticed this duplication problem, as well as 
other omission problem in fsoBucket, see issue 
[HDDS-9065](https://issues.apache.org/jira/browse/HDDS-9065)), we can first 
modify the test to:
   ```java
     @Test
     public void testListKeysWithValidStartKey() throws Exception {
       // case-10: keyPrefix corresponds an exist file and other file's prefix
       expectedKeys = newLinkedList(Arrays.asList("a1/b3/e3/e31.tx"));
       checkKeyList("a1/b3/e3/e31.tx", "", expectedKeys, fsoOzoneBucket);
     }
   ```
   


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