You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Hongbing Wang (Jira)" <ji...@apache.org> on 2023/07/23 15:45:00 UTC

[jira] [Assigned] (HDDS-9065) [FSO]ListKeys: Incorrect result when both file and dir matching keyPrefix

     [ https://issues.apache.org/jira/browse/HDDS-9065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hongbing Wang reassigned HDDS-9065:
-----------------------------------

    Assignee: Hongbing Wang

> [FSO]ListKeys: Incorrect result when both file and dir matching keyPrefix
> -------------------------------------------------------------------------
>
>                 Key: HDDS-9065
>                 URL: https://issues.apache.org/jira/browse/HDDS-9065
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Hongbing Wang
>            Assignee: Hongbing Wang
>            Priority: Major
>
> Giving Namespace in FSO bucket:
> {code:java}
> keys.add("/x/y/z/z1.tx");
> keys.add("/x/y/z/z1.txdir/z2.tx"); {code}
> When listKeys with keyPrefix:  "x/y/z/z1.tx", result is incorrent:
> {code:java}
> Expected :[x/y/z/z1.tx, x/y/z/z1.txdir/, x/y/z/z1.txdir/z2.tx]
> Actual   :[x/y/z/z1.tx, x/y/z/z1.tx] {code}
> The above problem can be reproduced in `TestListKeysWithFSO.java`:
> {code:java}
> private static void buildNameSpaceTree2(OzoneBucket ozoneBucket)
>     throws Exception {
>   LinkedList<String> keys = new LinkedList<>();
>   keys.add("/x/y/z/z1.tx");
>   keys.add("/x/y/z/z1.txdir/z2.tx");
>   createKeys(ozoneBucket, keys);
> } 
> @Test
> public void testListKeysWithMixOfDirsAndFiles() throws Exception {
>   expectedKeys = getExpectedKeyList("x/y/z/z1.tx", "", legacyOzoneBucket2);
>   checkKeyList("x/y/z/z1.tx", "", expectedKeys, fsoOzoneBucket2);
> }{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org