Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Retry and back-off for try-runtime batch request #13246

Closed
ggwpez opened this issue Jan 26, 2023 · 5 comments · Fixed by #13923
Closed

Retry and back-off for try-runtime batch request #13246

ggwpez opened this issue Jan 26, 2023 · 5 comments · Fixed by #13923
Assignees
Labels
J0-enhancement An additional feature request. U4-some_day_maybe Issue might be worth doing eventually. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder

Comments

@ggwpez
Copy link
Member

ggwpez commented Jan 26, 2023

The final request in the try-runtime CLI attempts to load too many values at once and then aborts on failure.
This is pretty annoying since it takes very long to even get to that point. The solution on the node side is to increase the RPC request/response size, but that makes it incompatible with public RPC. Example error from CI try-runtime-batch-error.txt.

Instead we could add some dynamic back-off to make it work with normal public nodes where it re-tries with a smaller batch size on failure.

@ggwpez ggwpez added J0-enhancement An additional feature request. U4-some_day_maybe Issue might be worth doing eventually. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder labels Jan 26, 2023
@xlc
Copy link
Contributor

xlc commented Jan 26, 2023

I am working on a JSON RPC proxy that could solve this problem by handling the retry / cache on the proxy level. Then you just need to start a local proxy instance and have try-runtime point to it instead of public endpoint. https://github.com/AcalaNetwork/subway

@ggwpez
Copy link
Member Author

ggwpez commented Jan 27, 2023

I am working on a JSON RPC proxy that could solve this problem by handling the retry / cache on the proxy level

But if you retry with the same batch size then it is just going to fail again?!

Another idea here would be to allow multiple remote endpoints and then use your proxy to load-balance the requests (although I think public Parity nodes are already load-balanced).

@xlc
Copy link
Contributor

xlc commented Jan 28, 2023

Another idea here would be to allow multiple remote endpoints and then use your proxy to load-balance the requests (although I think public Parity nodes are already load-balanced).

This is exactly the goal of subway.

Also it will should be able to separate batch call into individual item (to work with cache better) so it can handle large batch call that normal substrate node cannot handle

@kianenigma
Copy link
Contributor

Are we using remote nodes in our CI? that's 100% a mistake.

@ggwpez
Copy link
Member Author

ggwpez commented Jan 28, 2023

Are we using remote nodes in our CI? that's 100% a mistake.

I env-gated this test so that it wont do that, otherwise yes. The run_migrations above does the same.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request. U4-some_day_maybe Issue might be worth doing eventually. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants