Support streamState restore to avoid unnecessary read retries during worker restarts#3667
Draft
saurabhd336 wants to merge 1 commit intoapache:mainfrom
Draft
Support streamState restore to avoid unnecessary read retries during worker restarts#3667saurabhd336 wants to merge 1 commit intoapache:mainfrom
saurabhd336 wants to merge 1 commit intoapache:mainfrom
Conversation
Contributor
Author
|
@SteNicholas / @s0nskar / @zaynt4606 / others, wanted to start an early review of the idea. This PR is not complete yet, but wanted to check if the community finds value in this proposal. We've noticed post a server restart, a lot of the chunk requests are bound to fail becuase the streamState isn't restored unlike the diskFileInfo and other metadata. |
This file contains hidden or 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
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.
What changes were proposed in this pull request?
Whenever a worker restarts (including graceful restarts), all ongoing client read requests (i.e.
PbChunkFetchRequestrequests) start failing with"Stream ${streamChunkSlice.streamId} is not registered with worker. This can happen if the worker was restart recently."This is because while the DiskFileInfos in StorageManager is restored from recovery file, the streamState is not.
This failure leads to an expensive retry logic on the client side, which includes registering a new stream state, unnecessarily excluding the worker from hosting next set of shuffles and a complete re-read of the entire partition file in some cases (eg: when replication is enabled)
We can avoid this by persisting and restoring the streamState whereever possible
Why are the changes needed?
Allow worker chunk read retries for already registered streamIds to go through.
Does this PR resolve a correctness bug?
No
Does this PR introduce any user-facing change?
No
How was this patch tested?
TODO