Repository navigation
test(integration): service-mode data corruption e2e across writer/reader/compaction/truncate - #411
Conversation
…der/compaction/truncate Add a dedicated e2e file that closes the loop for local-disk data corruption on a 3-replica service cluster: a damaged replica's data.log and its effect on writer recovery, the earliest reader, compaction, and truncate, plus where an operator-declared skip range is the recovery tool. - Active + one damaged replica (B1): fence re-aligns to the two healthy replicas; reader still sees every entry. - Active + two/three truncated replicas (B2/B3): fence re-derives the LAC at the truncation point; reader reads up to it and reaches EOF without stalling. - Completed + one damaged replica (A1): reader fails over to healthy replicas. - Completed + two damaged replicas (A2a): a single healthy survivor still serves every entry. - Completed + a damaged range on all replicas (A3): reader stalls at the damaged entry, a skip range moves it past, and it continues with the healthy tail. - Truncate reclaims a damaged Completed segment and advances the truncation point. A2b (two damaged replicas plus a survivor behind the LAC) is behaviorally the same stall-and-skip path as A3 and is not constructed separately because its "survivor behind LAC" precondition is not deterministically constructible for a Completed segment. The observable behavior is covered by A3. Closes zilliztech#410.
CI commandsComment any of these to rerun checks on this pull request:
The |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #411 +/- ##
==========================================
+ Coverage 83.99% 84.01% +0.02%
==========================================
Files 213 213
Lines 30147 30147
==========================================
+ Hits 25321 25328 +7
+ Misses 3656 3648 -8
- Partials 1170 1171 +1
🚀 New features to boost your workflow:
|
Give the data-corruption e2e suite its own workflow so its failures surface independently of the broader failover suite, and rename the tests to a distinct TestDataCorruptionService prefix so neither workflow overlaps the other. The new workflow mirrors the existing e2e service job: start etcd + MinIO, create the bucket, run only the corruption tests, upload output on failure.
Adversarial review found no issues requiring changes. Verified:
Low (non-blocking)
|
Re-review of
|
Closes #410. Adds seven service-mode data corruption tests using a three-replica cluster and a dedicated CI workflow.
The tests damage or truncate replica
data.logfiles and assert recovery behavior:A2b is not constructed separately; A3 covers the same stalled-reader and skip-range recovery behavior.
Test infrastructure waits for restarted gRPC servers to initialize and for membership to converge before the next restart. Component CI excludes the dedicated test prefix. No production-code changes.
Validation: local etcd + MinIO, all seven tests with
go test -race -v -timeout=15m -run '^TestDataCorruptionService_' ./tests/integration/; existing full-cluster restart durability test also passes with-race.