-
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.
sql: fix race conditions in index merge progress tracking
This move us further away from the way the BackfillTracker works in the schemachanger package, but I wanted to start with something seems to pass the race tests before making any further changes. The main change here is that previously the TodoSpans slice-of-slices was passed around and ultimately accessed outside of any locking in a number of places. To avoid this, we replaced the Get/Set API with an Update API and changed the flush call to make a copy of the progress before trying to update the job. We also copy the MergeProgress when we first get passed it to avoid referencing a TodoSpans that someone else has a reference to. Release note: None
- Loading branch information
1 parent
2e2805c
commit ad30009
Showing
4 changed files
with
58 additions
and
35 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
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