-
Notifications
You must be signed in to change notification settings - Fork 188
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
perf(katana-rpc): spawn blocking tasks #1456
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## 01-18-Increase_katana_RPC_request_timeout_from_2_-_20_secs #1456 +/- ##
==============================================================================================
+ Coverage 68.51% 68.58% +0.06%
==============================================================================================
Files 220 221 +1
Lines 21690 21881 +191
==============================================================================================
+ Hits 14861 15007 +146
- Misses 6829 6874 +45 ☔ View full report in Codecov by Sentry. |
glihm
approved these changes
Jan 18, 2024
Base automatically changed from
01-18-Increase_katana_RPC_request_timeout_from_2_-_20_secs
to
dev/katana
January 18, 2024 15:25
kariy
added a commit
that referenced
this pull request
Jan 18, 2024
kariy
force-pushed
the
01-18-perf_katana-rpc_spawn_blocking_tasks
branch
from
January 18, 2024 15:25
9abf594
to
64942e1
Compare
kariy
added a commit
that referenced
this pull request
Jan 18, 2024
kariy
added a commit
that referenced
this pull request
Jan 18, 2024
Resolves #1448 Creates new crate under `katana`, `katana-tasks`, for managing spawning blocking tasks. RPC calls that mostly perform blocking tasks are now sent to their designated threadpools and won't block the async threads. - `TokioTaskSpawner`: mainly for spawning blocking IO-bound tasks (ie reading from storage) - `BlockingThreadPool`: mainly for spawning expensive CPU-bound tasks Depends on #1455 because now the RPC requests (that used to block the thread before) have to wait for the blocking tasks to finish and thus may be idling for more than 2 seconds which will result in a connection timeout. Doing `sozo migrate` on 2s timeout will failed when calling `/esimateFee` for estimating the World contract declare tx with error `connection closed before message completed`. Raw error message from `sozo` against the new changes: ```console Caused by: Failed to deploy world: Failed to migrate world: Migrator(Provider(Other(TransportError(Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("localhost")), port: Some(5050), path: "/", query: None, fragment: None }, source: hyper::Error(IncompleteMessage) }))))) ```
kariy
added a commit
that referenced
this pull request
Jan 19, 2024
kariy
added a commit
that referenced
this pull request
Jan 19, 2024
Resolves #1448 Creates new crate under `katana`, `katana-tasks`, for managing spawning blocking tasks. RPC calls that mostly perform blocking tasks are now sent to their designated threadpools and won't block the async threads. - `TokioTaskSpawner`: mainly for spawning blocking IO-bound tasks (ie reading from storage) - `BlockingThreadPool`: mainly for spawning expensive CPU-bound tasks Depends on #1455 because now the RPC requests (that used to block the thread before) have to wait for the blocking tasks to finish and thus may be idling for more than 2 seconds which will result in a connection timeout. Doing `sozo migrate` on 2s timeout will failed when calling `/esimateFee` for estimating the World contract declare tx with error `connection closed before message completed`. Raw error message from `sozo` against the new changes: ```console Caused by: Failed to deploy world: Failed to migrate world: Migrator(Provider(Other(TransportError(Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("localhost")), port: Some(5050), path: "/", query: None, fragment: None }, source: hyper::Error(IncompleteMessage) }))))) ```
kariy
added a commit
that referenced
this pull request
Jan 22, 2024
kariy
added a commit
that referenced
this pull request
Jan 22, 2024
Resolves #1448 Creates new crate under `katana`, `katana-tasks`, for managing spawning blocking tasks. RPC calls that mostly perform blocking tasks are now sent to their designated threadpools and won't block the async threads. - `TokioTaskSpawner`: mainly for spawning blocking IO-bound tasks (ie reading from storage) - `BlockingThreadPool`: mainly for spawning expensive CPU-bound tasks Depends on #1455 because now the RPC requests (that used to block the thread before) have to wait for the blocking tasks to finish and thus may be idling for more than 2 seconds which will result in a connection timeout. Doing `sozo migrate` on 2s timeout will failed when calling `/esimateFee` for estimating the World contract declare tx with error `connection closed before message completed`. Raw error message from `sozo` against the new changes: ```console Caused by: Failed to deploy world: Failed to migrate world: Migrator(Provider(Other(TransportError(Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("localhost")), port: Some(5050), path: "/", query: None, fragment: None }, source: hyper::Error(IncompleteMessage) }))))) ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #1448
Creates new crate under
katana
,katana-tasks
, for managing spawning blocking tasks. RPC calls that mostly perform blocking tasks are now sent to their designated threadpools and won't block the async threads.TokioTaskSpawner
: mainly for spawning blocking IO-bound tasks (ie reading from storage)BlockingThreadPool
: mainly for spawning expensive CPU-bound tasksDepends on #1455 because now the RPC requests (that used to block the thread before) have to wait for the blocking tasks to finish and thus may be idling for more than 2 seconds which will result in a connection timeout.
Doing
sozo migrate
on 2s timeout will failed when calling/esimateFee
for estimating the World contract declare tx with errorconnection closed before message completed
.Raw error message from
sozo
against the new changes: