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

WIP: Allow prefix listing without directory delimiter #55

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simonswine
Copy link
Contributor

@simonswine simonswine commented May 25, 2023

This change allows to list buckets by prefix with the parameter IterParams.WithoutAppendDirDelim is set, without appending a / in the end.

This allows to list huge "directories" bit by bit and in parallel. It is quite useful to list a huge amount of ULID (or other lexicographical ordered keys).

This would allow to preselect a creation time of blocks by e.g. listing /01H19* ULIDs, we would only list blocks created between 2023-05-25T08:21:51.744Z and 2023-05-25T17:41:06.175Z.

Before I spend more time on this, I wonder how people are feeling about it and if this useful for others.

Outstanding tasks:

  • Implement this for filesystem
  • Test coverage
  • Implement for other providers than azure/gcs/s3

@simonswine simonswine changed the title WIP: Allow pure prefix listing WIP: Allow prefix listing without directory delimiter May 25, 2023
This change allows to list buckets by pure prefix with the parameter
`IterParams.WithoutAppendDirDelim`.

This allows to list huge "directories" more efficently and in parallel.
Together with lexographical ordering of ULID certain time stamps can be
listed.

Outstanding tasks:

- [ ] Implement this for filesystem
- [ ] Test coverage
- [ ] Implement for other providers than azure/gcs/s3

Signed-off-by: Christian Simon <simon@swine.de>
@simonswine simonswine force-pushed the 20230525_allow-pure-prefix-listing branch from 6d1a315 to ffb0b7c Compare May 25, 2023 10:38
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I like it, I would vote for supporting such use case👍 just not sure if we want such opaque parameter or rather some first citizen support of prefix or even glob matching 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants