Skip to content

fix: preserve lease GrantTime during WAL replay to prevent expired le…#49

Merged
axfor merged 1 commit intomainfrom
rxx
Mar 10, 2026
Merged

fix: preserve lease GrantTime during WAL replay to prevent expired le…#49
axfor merged 1 commit intomainfrom
rxx

Conversation

@axfor
Copy link
Owner

@axfor axfor commented Mar 10, 2026

…ases from resurrecting after restart

Record original GrantTime (unix nano) in Raft log entries so that WAL replay preserves the original timestamp instead of resetting it with timeNow(). This fixes a production bug where expired leases reappeared with fresh TTLs after cluster restart. Also fixes a TimeToLive cache/store race condition where SyncFromStore could load a lease concurrently revoked by another goroutine.

Covers both RocksDB and Memory storage engines.

…ases from resurrecting after restart

Record original GrantTime (unix nano) in Raft log entries so that WAL replay
preserves the original timestamp instead of resetting it with timeNow(). This
fixes a production bug where expired leases reappeared with fresh TTLs after
cluster restart. Also fixes a TimeToLive cache/store race condition where
SyncFromStore could load a lease concurrently revoked by another goroutine.

Covers both RocksDB and Memory storage engines.
@axfor axfor merged commit 82f7cd0 into main Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant