-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Separate Lock for Keyspace to Update Controller Mapping in Schema Tracking #17873
base: main
Are you sure you want to change the base?
Conversation
…date controller mapping Signed-off-by: Harshit Gangal <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17873 +/- ##
==========================================
+ Coverage 67.45% 67.47% +0.01%
==========================================
Files 1594 1594
Lines 259064 259075 +11
==========================================
+ Hits 174760 174813 +53
+ Misses 84304 84262 -42 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this works, should we get rid of the locking altogether in the codepath that is reading data from vttablets?
Description
Problem
Previously, schema tracking update calls to VTTablet via GetSchema RPC and access to the keyspace-to-update-controller mapping (tracked map) were using the same lock. These operations are unrelated, but GetSchema RPC calls can be slow due to network-related reasons.
As a result, fetching the update controller from the map was blocked, leading to:
Solution
Introduced a separate mutex for managing access to the tracked map, ensuring that schema tracking operations are not blocked by RPC calls. This prevents delays in processing health updates and improves overall stability.
Backport Reason: Health check misses can lead to missing schema changes.
Related Issue(s)
Checklist
Deployment Notes