mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 11:07:31 +01:00
Review fold (codex01, test only): the frozen check, time.Now and the offset were separate reads, so a reader paused across freeze+release could see the clock go backwards. leaseTestClock serializes Now/Freeze/Resume/SetOffset under one mutex and never returns an earlier time than a previous Now. TestLeaseTestClockMonotonicAcrossFreezeResume runs readers across 50 freeze/resume transitions. The held-entered and under-hold progress waits get 30 s real-time failure exits (never a pass); the cleanup releases the hold and joins every worker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>