-
Notifications
You must be signed in to change notification settings - Fork 608
feat(services/azdls): list start from #5242
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
base: main
Are you sure you want to change the base?
feat(services/azdls): list start from #5242
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thank you @alexwilcoxson-rel for working on this. I've been considering porting logic from Hadoop to OpenDAL for a while but haven't taken action yet.
This feature is undocumented, so it's best not to enable it by default. How about adding a new flag called enable_list_with_start_after
, where we set the capability list_with_start_after
to true
?
hey @Xuanwo as I was refactoring the code I wrote a test against one of our actual storage accounts. I then executed the list call with recursive = true as the object_store integration does. However when I do that list result from azure contains everything. I'm trying to figure out how recursive could be impacting the azdls list but I don't see it used by azdls service. EDIT: ah I see the CompleteLayer, looking into this. |
Ok so I found the FlatLister does not retain the OpList args. Adding modifying FlatLister to take in the original args and pass them to the inner lister seems to work for this case, but I'm not sure how recursive listing and start_after should interact for all edge cases. The underlying Azure REST API does have a recursive parameter, but when actually using that:
|
Thank you @alexwilcoxson-rel for catching this.
It should be fine as long as we handle the capability correctly.
That seems to be a problem. Would you like to raise a separate issue for this? We can track it and switch to azdls's own |
|
|
Hey @Xuanwo just letting you know I probably won't get back to this until later in the week. I will share though that I am using this in our fork of version ~0.48 I think. We're using it along size the base object_store azure store (since those have all the put support for delta), and it has gone well! Looking forward to getting this in along with the put if-not-match changes that are in progress as well! |
Hi, @alexwilcoxson-rel, do we have a status change here? I'm open to get this feature merged under a new config called |
Hey @Xuanwo sorry for the delay on this, I have some cycles to try to get it across the line |
done |
In testing this with deltalake table loads, i see the object_store integration is doing a stat per list entry is there a way around this if the list response contains the needed metadata? i notice the metadata key stuff was removed (for the better 😄 ) |
sas_token support has been added in #6205 |
@Xuanwo can you provide input here please? |
I think it's fine for us to simply remove the stat from the list, since |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this!
@@ -162,11 +162,11 @@ impl<A: Access> CompleteAccessor<A> { | |||
(true, false) => { | |||
// Forward path that ends with / | |||
if path.ends_with('/') { | |||
let p = FlatLister::new(self.inner.clone(), path); | |||
let p = FlatLister::new(self.inner.clone(), path, args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to touch here since start_after
is handled by azdls directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this was related to this comment: #5242 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this was related to this comment: #5242 (comment)
Oh, I see. Sorry for overlooking that.
How about we split them into two PRs to handle them separately? I can also find some time to benchmark azdls’s recursive list.
We can add start_after
support in this PR and consider removing recursive support for azdls if we confirm that its performance is really poor.
I wish we can merge this PR quickly so you can use the mainline opendal ASAP 💌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so should i should remove all changes in flat_list and complete and then there will be a test with recursive and azdls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so should i should remove all changes in flat_list and complete and
Yes, let's remove all changes in flat_list and complete.
then there will be a test with recursive and azdls?
This has been covered in our behavior tests, so as long as our CI passes, everything should be fine.
@Xuanwo if your okay with latest changes, I can create follow up issues for
|
Perfect! Most changes looks good to me. We only need to remove the |
Which issue does this PR close?
Closes #.
Rationale for this change
This changes proposes implementation of the start_after workaround used by Hadoop to improve listing in ADLS from a particular point.
This is important for table formats like Delta Lake that make use of list_with_offset in object store to get the latest version of a table.
In my testing listing directories with > 10k records similar to what Delta Lake would do improves times from seconds to milliseconds (~3seconds to 60ms).
Also this adds SAS token support which could be split into its own PR but needed it for testing against my company's ADLS accounts.
What changes are included in this PR?
Changes to azdls module to include list with start_after functionality. This includes a module crc64 which computes crc for use in the continuation token generated for start after
Are there any user-facing changes?
Yes, start_after will function for azdls, and SAS token support.
@Xuanwo I'm opening this as a draft to get initial feedback. This is not directly supported by Microsoft, or I should say documented. In pursuit of them adding this capability to the azblob endpoints, they were the ones that directed me to Hadoop example, so I have confidence in it but could see if its something they would officially support/document.
One caveat as well is I believe (per the hadoop code) the change is will only work if hierarchical namespace (xns) is enabled which isn't something I believe we can tell when the list request is being made. It could be the user has to opt in and inform if xns is enabled. Hadoop code does another request to figure that out dynamically which I'd personally want to avoid.