mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
cc457c06c419606c6e4e8fbf4b9cc2d749cdf4fa
Three table-shaped subtests covering the failure paths of Sender.Run's BASE ∥ WAL goroutine pair (§6.8 #6 / P6 / G3). Companion to the existing TestC3_BaseWalParallel_FramesInterleave (happy path / overlap claim). #1 BASE error → WAL exits via groupCtx.Done Faulty store fails primaryStore.Read after N reads; streamBase returns a Substrate failure; groupCancel from BASE goroutine unblocks DrainBacklog parked on ctx; spy sink confirms drainCtxErrSeen != nil; lifecycle counters StartSession=1, EndSession=1; Run returns within 2s. #3 Outer ctx cancel → both lanes wind down Caller cancels parent ctx mid-session after WAL goroutine has entered DrainBacklog. Run returns within 2s; coord.EndSession defer fires (Phase back to Idle); sink.EndSession defer fires exactly once; DrainBacklog observed ctx cancellation. #2A WAL error → Run terminates (variant A — narrow) Spy sink returns synthetic error from DrainBacklog. BASE goroutine runs to completion (small store; streamBase is not ctx-aware). Run returns the WAL failure with PhaseBacklog; errors.Is unwraps to the synthetic; lifecycle counters correct. NOT asserted: prompt BASE stop on WAL failure. streamBase has no ctx-check today; variant B (future follow-up) would pair a periodic groupCtx.Err() check inside streamBase's loop with a strict prompt-stop assertion. Test header documents this. Spy WalShipperSink: structural-typing match (no exported types added); records StartSession / DrainBacklog / EndSession call counts; per-test drainBehavior selects immediate / block-until-ctx / synthetic-error. Refs: v3-recovery-wal-shipper-mini-plan.md §11.7 pillar 2 (dual-line execution); architect-recommended scope #1 + #3 + #2A. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Languages
Go
84.5%
Rust
7.9%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%