TaiJuWu commented on PR #5982:
URL: https://github.com/apache/ozone/pull/5982#issuecomment-1900598861
> The problem here is during creation of keys we have a slash at the
beginning of all keys
>
> ```java
> private static void buildNameSpaceTree(OzoneBucket ozoneBucket) throws
Exception {
> LinkedList<String> keys = new LinkedList<>();
> keys.add("/a1/b1/c1111.tx");
> keys.add("/a1/b1/c1222.tx");
> keys.add("/a1/b1/c1333.tx");
> ```
>
> FSO and legacy(fsenabled=true by default) normalize the initial slash and
store only the after-paths like `vol/buck/a1/b1` in the DB however in the OBS
case the initial slash is also stored like `vol/buck//a1/b1/`. This is causing
an issue during listKeys as the seek-key that is getting constructed is
vol/buck/a1/b1 and there is no such key present in the table thereby returning
an empty list. When we do a listKeys we should provide initial slash only then
will it get the proper results. One solution if we want all to test this
against all bucket types is in the creation is to remove the initial slashes of
all keys.
Got it. Thanks for your answer. Can this issue can be fix by modifying OBS
layout?
@adoroszlai Could you take a look this PR?
This PR is not related above question.
If you need to fix above issue I mentioned, maybe we can open another Jira.
--
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]