-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Make list backfills endpoint use asyncio #44208
base: main
Are you sure you want to change the base?
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.
Looks nice.
Just a few small suggestions.
Also I realized that we cannot have 'lazy' loading of some attributes at serialization time (when using pydantic), because this will be 'uncontroled async I/O'.
I don't know if you are encountering this on the Backfill model, but basically it means that everything needs to be eager loaded before, so pydantic does not emit uncontrolled request afterwards. (and unfortunatly we cannot await BackfillResponse.model_validate
)
Also just to mention that there is a stream
API to iterate over multiple results. That could be interesting to see if this can help us here.
74cbd14
to
1efe639
Compare
This enables us to have simpler API code, since we don't need to call `model_validate` as much.
c2eb8e2
to
a9c6980
Compare
a9c6980
to
f835db5
Compare
This is a sort of hello world / proof of concept for having an route implemented using asyncio.
Depends on #44226