Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NSFS] Fix list objects ordering to follow AWS S3 #8324

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tangledbytes
Copy link
Member

@tangledbytes tangledbytes commented Sep 3, 2024

Explain the changes

This PR replaces the pre-existing sorting functions in listObjects (NSFS) with a new one which tries to treat strings as UTF8 encoded Uint8Arrays. This helps with sorting the array of strings in a similar fashion as AWS S3 does.

Issues: Fixed #xxx / Gap #xxx

Fixes #8218

Testing Instructions:

  1. ./node_modules/.bin/mocha src/test/unit_tests/test_namespace_fs.js
  2. ./node_modules/.bin/jest src/test/unit_tests/jest_tests/js_utils.test.js
  • Doc added/updated
  • Tests added

@tangledbytes tangledbytes force-pushed the utkarsh/fix/list-objects-order branch 2 times, most recently from dea5a53 to e2f82c8 Compare September 3, 2024 11:51
@tangledbytes tangledbytes marked this pull request as ready for review September 3, 2024 12:20
@tangledbytes tangledbytes force-pushed the utkarsh/fix/list-objects-order branch from e2f82c8 to 0f7adb7 Compare September 5, 2024 11:18
@tangledbytes tangledbytes force-pushed the utkarsh/fix/list-objects-order branch from 0f7adb7 to 1d9f7de Compare September 19, 2024 11:13
Signed-off-by: Utkarsh Srivastava <[email protected]>

add more tests for asserting the correctness of utf8 sorting

Signed-off-by: Utkarsh Srivastava <[email protected]>

fix order when markers are involved

Signed-off-by: Utkarsh Srivastava <[email protected]>

add caching for name buffers - lifetime limited to per invocation of list_objects

Signed-off-by: Utkarsh Srivastava <[email protected]>
@tangledbytes tangledbytes force-pushed the utkarsh/fix/list-objects-order branch from 1d9f7de to b19d5ae Compare September 19, 2024 11:14
Copy link

This PR had no activity for too long - it will now be labeled stale. Update it to prevent it from getting closed.

@github-actions github-actions bot added the Stale label Dec 31, 2024
@romayalon romayalon removed the Stale label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List objects with unicode - should sort keys using byte-by-byte order and not using utf8 sort order
2 participants