Skip to content

Commit f95806f

Browse files
support downgrade CI
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
1 parent 265b2c6 commit f95806f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

go/test/endtoend/reparent/emergencyreparent/ers_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
"vitess.io/vitess/go/mysql"
3333
"vitess.io/vitess/go/test/endtoend/cluster"
3434
"vitess.io/vitess/go/test/endtoend/reparent/utils"
35+
e2eutils "vitess.io/vitess/go/test/endtoend/utils"
3536
"vitess.io/vitess/go/vt/log"
3637
"vitess.io/vitess/go/vt/vtctl/reparentutil/policy"
3738

@@ -638,6 +639,10 @@ func TestERSFailFast(t *testing.T) {
638639
// The replica with the stopped IO thread will have a lower Combined position and should be
639640
// filtered out. We verify this by checking the EmergencyReparentFilteredCandidates stat.
640641
func TestERSFiltersNonMostAdvancedCandidates(t *testing.T) {
642+
// The EmergencyReparentFilteredCandidates stat was added in v25 along with the
643+
// partial relay-log-apply filter. Skip on older vtctld where neither exists.
644+
e2eutils.SkipIfBinaryIsBelowVersion(t, 25, "vtctld")
645+
641646
clusterInstance := utils.SetupReparentCluster(t, policy.DurabilitySemiSync)
642647
defer utils.TeardownCluster(clusterInstance)
643648
tablets := clusterInstance.Keyspaces[0].Shards[0].Vttablets
@@ -690,6 +695,11 @@ func TestERSFiltersNonMostAdvancedCandidates(t *testing.T) {
690695
// keeps both tablets, the uniformCombined check fires, and ERS aborts before
691696
// risking promotion of either diverged side.
692697
func TestERSSplitBrainDetection(t *testing.T) {
698+
// The upfront "suspected split-brain" abort was added in v25. Older vtctld either
699+
// promotes one side silently or surfaces a different error message, so this test
700+
// is only meaningful against v25+.
701+
e2eutils.SkipIfBinaryIsBelowVersion(t, 25, "vtctld")
702+
693703
clusterInstance := utils.SetupReparentCluster(t, policy.DurabilitySemiSync)
694704
defer utils.TeardownCluster(clusterInstance)
695705
tablets := clusterInstance.Keyspaces[0].Shards[0].Vttablets
@@ -735,6 +745,11 @@ func TestERSSplitBrainDetection(t *testing.T) {
735745
// TestReplicationStopped checks that ERS ignores the tablets that have sql thread stopped.
736746
// If there are more than 1, we also fail.
737747
func TestReplicationStopped(t *testing.T) {
748+
// In v25 ERS tolerates partial relay-log-apply failures and succeeds as long as
749+
// one leading candidate applies; this test asserts that new behavior. Older vtctld
750+
// still fails on any single replica error.
751+
e2eutils.SkipIfBinaryIsBelowVersion(t, 25, "vtctld")
752+
738753
clusterInstance := utils.SetupReparentCluster(t, policy.DurabilitySemiSync)
739754
defer utils.TeardownCluster(clusterInstance)
740755
tablets := clusterInstance.Keyspaces[0].Shards[0].Vttablets

0 commit comments

Comments
 (0)