-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
76825: rangefeed: fix panic due to rangefeed stopper race r=RaduBerinde a=erikgrinaker This patch fixes a race condition that could cause an `unexpected Stopped processor` panic if a rangefeed registration was attempted while a store was stopping. Registering a rangefeed panics if a newly created rangefeed processor is unexpectedly stopped and the store's stopper is not quiescing. However, the stopper has two distinct states that it transitions through: stopping and quiescing. It's possible for the processor to fail to start because the stopper is stopping, but before the stopper has transitioned to quiescing, which would trigger this panic. This patch propagates the processor startup error to the rangefeed registration and through to the caller, returning before attempting the registration at all and avoiding the panic. This was confirmed with 50000 stress runs of `TestPGTest/pgjdbc`, all of which succeeded. Resolves #76811. Resolves #76767. Resolves #76724. Resolves #76655. Resolves #76649. Resolves #75129. Resolves #64262. Release note (bug fix): Fixed a race condition that in rare circumstances could cause a node to panic with `unexpected Stopped processor` during shutdown. --- For details, see #76649 (comment). Co-authored-by: Erik Grinaker <[email protected]>
- Loading branch information
Showing
3 changed files
with
28 additions
and
15 deletions.
There are no files selected for viewing
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
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
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