Repository navigation
[CI] CI fix sweep for 8.0 - #5699
valkeyrie-ops[bot] wants to merge 1 commit into
Conversation
|
Pushed 868cd01 with a fix for The test now waits long enough for the server to retry after a split vote (150 s instead of 50 s) and allows "Failover attempt expired" only for a replica that took part in a split vote. All other replicas are still checked for no failover timeout, and the epoch 0 check is unchanged. The failing test passed 30 loops with the fix, and the bot's review approved it. Diagnosis and checksWhat failed: Primaries will not time out then they are elected in the same epoch in tests/unit/cluster/failover2.tcl (No failover detected) Root cause: The test rejects a split vote, which this branch's server can only resolve by letting the election expire. In the log replica 9 won epoch 8 at 09:10:11.797, then replicas 7 and 8 both started an election for epoch 9 at 09:10:12.143 and 09:10:12.145. Primaries 3 and 6 and the new primary 9 voted for replica 7, primaries 4 and 5 voted for replica 8, so the votes were 3 to 2 with a needed quorum of 4 and no one won the epoch. Because no node claimed an epoch equal to or higher than 9, neither election was reset, and both replicas logged "Failover attempt expired" from 09:10:42. On 8.0 the retry comes after four times the node timeout, 60 s with cluster-node-timeout 15000, while the test waits 50 s and failed at 09:10:46. The election delay on 8.0 is a fixed 500 + random() % 500 ms with no ranking across failed shards, so the larger node timeout ported earlier does not space the shards' elections here and only makes the retry slower. The failure is flaky. The fix: A split vote in which no candidate reaches the majority, followed by a timeout and a retry, is correct server behaviour on 8.0, so the test should accept it rather than the server changing. The exception is narrow: a replica may time out only if it started an election in an epoch in which another replica also started one and which no replica won, as read from the "Starting a failover election for epoch" and "configEpoch set to N after successful failover" log lines. A replica that times out although another node won its epoch, which is what the test exists to catch, still fails. I kept the natural timing of the three elections instead of releasing the replicas one by one, because serialising them would stop the test from ever exercising same-epoch elections or the false epoch 0 case. No product change is made: upstream avoids or resolves split votes with features (failed primary ranking in #1018, the FAILOVER_AUTH_NACK message in #3833) that are not minimal backports for this branch. What the bot checked
The agent's own notesNothing was run here, and since a split vote is rare, the looped verification will mostly exercise the normal path, not the new exception. The default branch does not have this change and does not need it: since #3833 a split vote is retried through FAILOVER_AUTH_NACK without waiting for the timeout, and its version of this test controls the election epoch with debug commands that 8.0 lacks. None of the commits listed for the other release branches fits, they only change src/rdb.c. Open pull request #4296 only moves run_solo tests to a dedicated CI job and does not address this. The already ported #3946 (0e0cac5) left the node timeout at 15000, which was already the effective value, so it could not have fixed this. I could not inspect the other release branches; any branch without the NACK message can hit the same split vote and would take the same test change. One limit of the new check: it does not order events in time, so a replica that was in a split vote and wrongly failed to reset on a later, higher epoch claim would not be caught. With one split vote the test takes about 80 to 90 s instead of about 20 s. What the server did: it recovered on its own, but only 60 s after the split, which is by design on 8.0; whether to backport the failed primary ranking (#1018) to make split votes rarer is a maintainer decision. #5508's CI decides whether the fix holds once this is merged, and the bot never merges. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
ffcc415 to
979c514
Compare
1a2c9d7 to
d3a8253
Compare
The test rejects a split vote, which this branch's server can only resolve by letting the election expire. In the log replica 9 won epoch 8 at 09:10:11.797, then replicas 7 and 8 both started an election for epoch 9 at 09:10:12.143 and 09:10:12.145. Primaries 3 and 6 and the new primary 9 voted for replica 7, primaries 4 and 5 voted for replica 8, so the votes were 3 to 2 with a needed quorum of 4 and no one won the epoch. Because no node claimed an epoch equal to or higher than 9, neither election was reset, and both replicas logged "Failover attempt expired" from 09:10:42. On 8.0 the retry comes after four times the node timeout, 60 s with cluster-node-timeout 15000, while the test waits 50 s and failed at 09:10:46. The election delay on 8.0 is a fixed 500 + random() % 500 ms with no ranking across failed shards, so the larger node timeout ported earlier does not space the shards' elections here and only makes the retry slower. A split vote in which no candidate reaches the majority, followed by a timeout and a retry, is correct server behaviour on 8.0, so the test should accept it rather than the server changing. The exception is narrow: a replica may time out only if it started an election in an epoch in which another replica also started one and which no replica won, as read from the "Starting a failover election for epoch" and "configEpoch set to N after successful failover" log lines. A replica that times out although another node won its epoch, which is what the test exists to catch, still fails. I kept the natural timing of the three elections instead of releasing the replicas one by one, because serialising them would stop the test from ever exercising same-epoch elections or the false epoch 0 case. No product change is made: upstream avoids or resolves split votes with features (failed primary ranking in #1018, the FAILOVER_AUTH_NACK message in #3833) that are not minimal backports for this branch. CI-Fix-Job: test-ubuntu-latest CI-Fix-Run: https://github.com/valkey-io/valkey/actions/runs/46245707417 Signed-off-by: valkeyrie-ops[bot] <284117741+valkeyrie-ops[bot]@users.noreply.github.com>
d3a8253 to
5d6ce9a
Compare
CI fix sweep for 8.0
Automated fixes for CI failures on #5508.
Applied
test-ubuntu-latest(run)Fix details are posted as comments on this PR.
Generated by valkey-ci-agent using Claude Code.