mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-13 16:11:29 +00:00
0ca57dc2eb
Add max-bytes retention budget alongside existing timeout budget: - shipper_group.go: EvaluateRetentionBudgets now checks both timeout (last contact time) and max-bytes (entry lag * 4KB > maxBytes). Either exceeding budget → NeedsRebuild state transition. - blockvol.go: add walRetentionMaxBytes (64MB default), pass to EvaluateRetentionBudgets with primaryHeadLSN. TestWalRetention_MaxBytesTriggersNeedsRebuild upgraded from PASS* (log-only placeholder) to real PASS: asserts State()==NeedsRebuild after lag exceeds configured max-bytes budget. Retention contract: hold-back blocks reclaim for recoverable replicas, timeout and max-bytes budgets escalate to NeedsRebuild and release hold. Full rebuild lifecycle remains CP13-7 scope. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>