Open GuptaManan100 opened 1 day ago
Hello reviewers! :wave: Please follow this checklist when reviewing this Pull Request.
release notes (needs details)
label if users need to know about this change.-
), and have a clear help text.Jobs
should be named in order to mark it as required
.required
, the maintainer team must be notified._vt
tables and RPCs need to be backward compatible.vtctl
command output order should be stable and awk
-able.Attention: Patch coverage is 87.50000%
with 5 lines
in your changes missing coverage. Please review.
Project coverage is 67.39%. Comparing base (
c5d0ecc
) to head (916e97f
). Report is 3 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
go/vt/vtorc/inst/instance_dao.go | 87.50% | 5 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚨 Try these New Features:
Description
As pointed out in https://github.com/vitessio/vitess/issues/17254, there is a case where VTOrc is unable to detect errant GTIDs on a tablet that got demoted.
The underlying cause of the problem was that VTOrc was not running errant GTID detection for tablets that weren't connected to any primary. Previously it would fix the replication on the tablet first and then run errant GTID detection eventually to figure out if it had errant GTIDs. However, ever since we made the vttablets also run errant GTID detection on reparent (https://github.com/vitessio/vitess/pull/16833), VTOrc is unsuccessful in reparenting the tablet with errant GTIDs since the vttablets fail with an error.
The fix is to augment VTOrc to run errant GTID detection with the primary tablet that it would reparent the replica to. There is only one special case that we need to handle which is that of the new primary's information not being advanced enough. Since VTOrc gathers information in a polling fashion, it is possible that the shard record in its data store points to the new primary, but the data collected from the new primary is older than when the promotion happened. If we use this information for errant GTID detection, we will end up marking the wrong GTIDs as errant. This situation is, however, easy to detect. We do so by checking if the primary's record has a source of its own or not. If it doesn't then the information has to have been gathered after it was promoted.
Related Issue(s)
Checklist
Deployment Notes