-
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
Fixes for avoidance of hosts taking backup in PRS & ERS #17300
Fixes for avoidance of hosts taking backup in PRS & ERS #17300
Conversation
Signed-off-by: Eduardo J. Ortega U. <[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
|
Signed-off-by: Eduardo J. Ortega U. <[email protected]>
Signed-off-by: Eduardo J. Ortega U. <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17300 +/- ##
==========================================
- Coverage 67.41% 67.41% -0.01%
==========================================
Files 1576 1576
Lines 253417 253430 +13
==========================================
+ Hits 170846 170851 +5
- Misses 82571 82579 +8 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Eduardo J. Ortega U. <[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.
LGTM
This PR is a manual backport of upstream vitessio#17300 The information below is a copy of what the description of the upstream PR This PR addresses fixes issues in PRS & ERS preference for tablets that are not taking backups. It does away with redundant field definitions in some of the proto messages and addresses segfault that could take place during ERS.
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 these changes look good, the fact that the previous PR caused vtctld to crash points to missing tests.
Can you come up with a test case that would reproduce that particular crash and add it into this PR please?
I noticed that one of the commits says "fix SIGSEGV in test". Which test was that, and how was it passing on the previous PR? |
The first PR accessed the flag indicating whether a backup was or not running directly from a field in a struct. The new code access it from a field in a pointer to the struct. Thus the previous PR always found something there (even if it was the default false), whereas the new one could get a nil struct and crash. Hence why that commit wrapped that in some checks for the struct pointer not being null. |
The crash during ERS was a consequence of my first attempt to fix the fact that I was using the wrong value for figuring out whether the backup was running or not. By replacing this with this I introduced In any case, I just added some test cases to ensure that the value of the map with backup state information is correct, and to verify that if the |
I don't see any new tests, maybe you forgot to push the new commit? |
Signed-off-by: Eduardo J. Ortega U. <[email protected]>
Signed-off-by: Eduardo J. Ortega U. <[email protected]>
They should be visible now. |
Signed-off-by: Eduardo J. Ortega U. <[email protected]>
…) (#572) This is a backport of upstream's vitessio#17300 . Description of the upstream PR follows: Description This PR addresses fixes issues in PRS & ERS preference for tablets that are not taking backups. It does away with redundant field definitions in some of the proto messages and addresses segfault that could take place during ERS. Signed-off-by: Eduardo J. Ortega U. <[email protected]>
Description
This PR addresses fixes issues in PRS & ERS preference for tablets that are not taking backups. It does away with redundant field definitions in some of the
proto
messages and addresses segfault that could take place during ERS.Related Issue(s)
#17299
#16997
Checklist
Deployment Notes
N/A