-
Notifications
You must be signed in to change notification settings - Fork 25
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
Don't fail on large requests #113
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
Since this lib is using grpc-gateway to make request, It's not likely able to set the grpc option. But maybe you can paginate by using the For example:
|
Apparently the suggested way to do paging is with
which grabs 1000 entries at a time until range_end. It should also use the same revision as the first result, probably. The more I think about this, the more I think hat |
Yeah, maybe we can add a new stateful util, named like "ranger util" Thank you so much for contribution. |
Here's what I ended up with. I can't quite figure out where to put it, so feel free to put it where you think it makes the most sense. I tried to keep as much of the normal
|
I prefer adding a new stateful util. Cause you have to make multiple request in during the process which means you must have states to tell what page you are at. (stateful) And I suggest this:
|
I was planning to write some higher level apis too, like get, get_prefix, delete_prefix, get_keys. You can, if you like, just stick to writing a function and put them in a file like Don't for get to test them on both py2 and py3 |
One issue you're going to run into is writing them to work with both sync and async methods. |
yeah, it's impossible to make a function both sync and async while it makes multiple requests brefore return. and you can make them accessible from a same method |
Description
I did a large range request and got what looks like an overflow error. I don't see an obvious way to do pagination or the like; is there one I'm missing, or is/should etcd3-py wrapping those up somehow?
What I Did
The text was updated successfully, but these errors were encountered: