-
Notifications
You must be signed in to change notification settings - Fork 406
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
Handle rate limiting during write contention #2451
Comments
cc @ion-elgreco since you’re on a roll |
@adriangb this one is a little bit more tricky, since we need to customize the deltalake-gcp crate: https://github.com/delta-io/delta-rs/blob/main/crates/gcp/src/lib.rs. Also this might already fixed when we use a Conditional Put: #2296 |
I don't think this will be fixed by #2296. As per GCP Docs:
So if you try to do a PUT (of any kind) to the same key more than 1 time per second you get a 429 error. If there are two writers that try to commit the same version within 1s of each other this will happen, I don't think it matters if that was done via a PUT or a copy. |
@adriangb I see, yeah then there should be a fast path in the deltalake-gcp crate that handles that 429 error. I see you know how to write Rust, so maybe could take a look at that : P (I don't have gcp myself) |
I'm not sure what you mean by "fast path". I gave it a quick shot. I'm just not sure how we're supposed to deal with that error. I'm also happy to give you access to a test bucket if you'd like :) |
During concurrent writes there is going to be contention for the next commit
.json
file.GCS has a hard limit on 1 mutation operation per second per key, so that gets hit immediately.
You get back a 429, which should just be interpreted as "someone else wrote that key already, advance to the next commit id and try again" but is instead being surfaced as an error:
Test code:
The text was updated successfully, but these errors were encountered: