-
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
Improve errant GTID detection in ERS to handle more cases. #16926
Improve errant GTID detection in ERS to handle more cases. #16926
Conversation
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[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 #16926 +/- ##
==========================================
- Coverage 67.16% 67.15% -0.01%
==========================================
Files 1571 1571
Lines 252093 252228 +135
==========================================
+ Hits 169314 169381 +67
- Misses 82779 82847 +68 ☔ View full report in Codecov by Sentry. |
…parentJournalInfo implemented Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
…rovement Signed-off-by: Manan Gupta <[email protected]>
…nted Signed-off-by: Manan Gupta <[email protected]>
…code Signed-off-by: Manan Gupta <[email protected]>
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.
Once unit tests have been fixed, can you check what code coverage looks like? Otherwise lgtm.
Signed-off-by: Manan Gupta <[email protected]>
…nal info Signed-off-by: Manan Gupta <[email protected]>
This is the report from the coverage tests -
The two that are important to note are -
The only lines untested by the unit tests in Overall, we are going from 90.5% coverage to 91% coverage in this PR. |
Description
This PR adds the code changes for reworking the errant GTID detection in ERS. As proposed in #16724 (comment), we now also use the reparent journal length as an extra data point for GTID detection. All the different cases listed in #16274 have been added as unit tests in this PR, and the expectations of the algorithm have been verified.
Since,
ReadReparentJournalInfo
is a new RPC, there can be customers that upgrade Vitess multiple versions at a time (we are adding the new RPC in v21, but it is not available in releases prior to that). In this case, the vttablets won't have the RPC implemented. Since we don't want ERS to stop working in this situation, we have to keep the legacy errant GTID code around for this scenario. So, if reading the reparent journal information fails on any tablet, then we revert to using that legacy errant GTID detection code.Related Issue(s)
Checklist
Deployment Notes