Use spawn_async in ByRoot handling workers#5557
Conversation
ethDreamer
left a comment
There was a problem hiding this comment.
ohhhh now I see what u meant by separate thread for the consumer.. good catch!
LGTM
|
@ethDreamer pointed out the logging changes slightly - we exit early on an error, prior to logging how many requests we sent. The same changed in this PR: #5556 mark said he'd make a follow up PR for this though |
|
For some reason, changing the In this commit, I boxed the large unboxed fields in these variants 52777c9 , which reduced the size |
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyDetailsThe pull request has been merged automatically at b6a1c86 |
Issue Addressed
Work::BlocksBy.*Requestare the only two work events usingspawn_blocking_with_manual_send_idle. Its syntax prevents the use of helpful patterns like:So far it's unclear to me why this specific work needs to use such an executor pattern. Serving blocks should be a purely i/o bound task with any long blocking CPU tasks. One expensive op dug there is forwards_iter_block_roots cloning the entire head state, but I'm unsure if it justifies the pattern.
I lack the historical context to declare this solution proper, but I'm opening this PR to trigger a conversation.
Proposed Changes
Use spawn_async in ByRoot handling workers