[9.3] (backport #19948) tbs: Fix potential data race#20140
Merged
mergify[bot] merged 3 commits into9.3from Feb 17, 2026
Merged
Conversation
* Add test confirming the potential data race * Remove unnecessary sleeps * Add assertion for transaction ids at the end * Add parent id to transaction2 * Update potential race condition test * Try fixing race condition * Fix bug where multiple ongoing trasactions can race to delete first * Add ShardLockReadWriter * Panic if numShards <= 0 * Remove unnecessary code * Use RWMutex * Make fmt * Add shard lock on processor level instead * Make fmt update * Revert "Make fmt update" This reverts commit b788c3f. * Update based on review (cherry picked from commit 67a5a2b)
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @ericywl? 🙏 |
1 similar comment
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @ericywl? 🙏 |
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @ericywl? 🙏 |
Contributor
💚 Build Succeeded
History
cc @ericywl |
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @ericywl? 🙏 |
1 similar comment
Contributor
Author
|
This pull request has not been merged yet. Could you please review and merge it @ericywl? 🙏 |
carsonip
approved these changes
Feb 17, 2026
41 tasks
Contributor
Author
Merge Queue StatusRule:
This pull request spent 8 minutes 26 seconds in the queue, including 8 minutes 14 seconds running CI. Required conditions to merge
|
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.
Summary
Fix potential data race between
WriteTraceEventinProcessBatchandReadTraceEventin the sampling goroutine. Closes #17772.Performance
Baseline
Single Mutex
ShardLockReadWriter
ShardLockReadWriter with RWMutex