Regularly wake from timely to deal with eaten wake-ups#13972
Closed
frankmcsherry wants to merge 1 commit into
Closed
Regularly wake from timely to deal with eaten wake-ups#13972frankmcsherry wants to merge 1 commit into
frankmcsherry wants to merge 1 commit into
Conversation
benesch
added a commit
to benesch/materialize
that referenced
this pull request
Jul 30, 2022
This is an alternative to MaterializeInc#13972 that avoids hardcoding the 1s timeout. As described there: This addresses a race that appears in storaged where the LocalClient will wake worker threads that have inbound messages to read, but the wake-ups are (or appear to be) eaten by various non-Timely sleepy moments in the code. If these wake-ups are quietly eaten, and then Timely is entered with a None timeout and nothing to do, it will sleep forever. Would close MaterializeInc#13972 if merged.
3 tasks
benesch
added a commit
to benesch/materialize
that referenced
this pull request
Jul 30, 2022
This is an alternative to MaterializeInc#13972 that avoids hardcoding the 1s timeout. As described there: This addresses a race that appears in storaged where the LocalClient will wake worker threads that have inbound messages to read, but the wake-ups are (or appear to be) eaten by various non-Timely sleepy moments in the code. If these wake-ups are quietly eaten, and then Timely is entered with a None timeout and nothing to do, it will sleep forever. Would close MaterializeInc#13972 if merged. Many, many thanks to @frankmcsherry for determining that lost wakeups were the cause of this issue. Co-authored-by: Frank McSherry <fmcsherry@me.com>
benesch
added a commit
that referenced
this pull request
Jul 31, 2022
This is an alternative to #13972 that avoids hardcoding the 1s timeout. As described there: This addresses a race that appears in storaged where the LocalClient will wake worker threads that have inbound messages to read, but the wake-ups are (or appear to be) eaten by various non-Timely sleepy moments in the code. If these wake-ups are quietly eaten, and then Timely is entered with a None timeout and nothing to do, it will sleep forever. Would close #13972 if merged. Many, many thanks to @frankmcsherry for determining that lost wakeups were the cause of this issue. Co-authored-by: Frank McSherry <fmcsherry@me.com>
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.
This addresses a race that appears in
storagedwhere theLocalClientwill wake worker threads that have inbound messages to read, but the wake-ups are (or appear to be) eaten by various non-Timely sleepy moments in the code. If these wake-ups are quietly eaten, and then Timely is entered with aNonetimeout and nothing to do, it will sleep forever.It would be nice to fix this better, but just introducing a time-out seems to be the most robust way to fix this.
Motivation
CI had various timeouts that were experienced when
storagedclients were "slow-rolled" commands, being provided first withInitializationCompletecommands and then source creation commands. The creation commands could be missed, when presented in this order, as was introduced in 9b2eb6d. This has been reverted, but if it is reintroduced with this change the timeout does not appear to manifest.Tips for reviewer
Checklist
This PR has adequate test coverage / QA involvement has been duly considered.
This PR evolves an existing
$T ⇔ Proto$Tmapping (possibly in a backwards-incompatible way) and therefore is tagged with aT-protobuflabel.This PR includes the following user-facing behavior changes: