Skip to content

fix: lease expiry in cluster mode when granted via follower#48

Merged
axfor merged 1 commit intomainfrom
r20
Mar 9, 2026
Merged

fix: lease expiry in cluster mode when granted via follower#48
axfor merged 1 commit intomainfrom
r20

Conversation

@axfor
Copy link
Copy Markdown
Owner

@axfor axfor commented Mar 9, 2026

The leader's checkExpiredLeases() only checked its in-memory cache, missing leases created through follower nodes. Added SyncFromStore() before each expiry check so the leader always has a complete view.

Also fixed cluster test infrastructure: wired up SetRaftNode() and OnLeaderChange() in newEtcdCluster/newEtcdRocksDBCluster so tests run with real leader/follower status instead of standalone mode.

Added lease expiry E2E tests covering single-node, 3-node cluster (via leader and follower), RocksDB engine, and restart scenarios.

The leader's checkExpiredLeases() only checked its in-memory cache,
missing leases created through follower nodes. Added SyncFromStore()
before each expiry check so the leader always has a complete view.

Also fixed cluster test infrastructure: wired up SetRaftNode() and
OnLeaderChange() in newEtcdCluster/newEtcdRocksDBCluster so tests
run with real leader/follower status instead of standalone mode.

Added lease expiry E2E tests covering single-node, 3-node cluster
(via leader and follower), RocksDB engine, and restart scenarios.
@axfor axfor merged commit ff5c864 into main Mar 9, 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