Improve errant GTID detection in ERS to handle more cases.#16926
Improve errant GTID detection in ERS to handle more cases.#16926GuptaManan100 merged 10 commits intovitessio:mainfrom
Conversation
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
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 <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
…rovement Signed-off-by: Manan Gupta <manan@planetscale.com>
…nted Signed-off-by: Manan Gupta <manan@planetscale.com>
…code Signed-off-by: Manan Gupta <manan@planetscale.com>
deepthi
left a comment
There was a problem hiding this comment.
Once unit tests have been fixed, can you check what code coverage looks like? Otherwise lgtm.
Signed-off-by: Manan Gupta <manan@planetscale.com>
…nal info Signed-off-by: Manan Gupta <manan@planetscale.com>
|
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. |
…16926) Signed-off-by: Manan Gupta <manan@planetscale.com>
…16926) Signed-off-by: Manan Gupta <manan@planetscale.com>
…dle more cases. (vitessio#16926) (#779) * Improve errant GTID detection in ERS to handle more cases. (vitessio#16926) Signed-off-by: Manan Gupta <manan@planetscale.com> * disable upgrade_downgrade_test_reparent_old_vttablet.yml * skip TestAliasesInOuterJoinQueries --------- Signed-off-by: Manan Gupta <manan@planetscale.com> Co-authored-by: Manan Gupta <35839558+GuptaManan100@users.noreply.github.com>
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 #16724 have been added as unit tests in this PR, and the expectations of the algorithm have been verified.
Since,
ReadReparentJournalInfois 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