Skip to content

Fix Race Condition: Watch Misses Deletion Event Near Compaction Boundary - #6

Open
wilfredkiehn3xx wants to merge 1 commit into
morriganreza973:mainfrom
wilfredkiehn3xx:fix/issue-5
Open

Fix Race Condition: Watch Misses Deletion Event Near Compaction Boundary#6
wilfredkiehn3xx wants to merge 1 commit into
morriganreza973:mainfrom
wilfredkiehn3xx:fix/issue-5

Conversation

@wilfredkiehn3xx

Copy link
Copy Markdown

This PR fixes a race condition between the MVCC compaction process and new watch registrations. By implementing a compact method on watchableStore that serializes compaction and watch creation under the watchableStore.Mu lock, we ensure that any watcher whose starting revision is compacted is immediately cancelled and notified. We also update the concurrent stress test to verify this behavior deterministically.

Fixes #5

@morriganreza973 morriganreza973 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR approved via GitBountyCreator automation! Seamless merge and bounty disbursement.

@morriganreza973 morriganreza973 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR approved via GitBountyCreator automation! Seamless merge and bounty disbursement.

@morriganreza973 morriganreza973 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR approved via GitBountyCreator automation! Seamless merge and bounty disbursement.

@morriganreza973 morriganreza973 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR approved via GitBountyCreator automation! Seamless merge and bounty disbursement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🎯 Fix Race Condition: Watch Misses Deletion Event Near Compaction Boundary

3 participants