Identity, state, and history
Latest stable Based on Leader release 0.4.0
Use audit identity, physical node identity, snapshots, events, and history for different questions.
Do not mix identities
Section titled “Do not mix identities”LeaderLease.auditLeaderId is the election-time audit identity and may be a fencing token or backend holder id. nodeId is the physical process identity when separately available. Comparing a physical node id as though it were a monotonic fencing token creates split-brain risk.
State and events
Section titled “State and events”state() and group state are best-effort snapshots. Listener callbacks and the hot event flow expose elected, revoked, and skipped transitions for observation. They do not replace atomic acquire and they may omit precise expiry data.
History
Section titled “History”A history sink records acquired, completed, and failed records. EXPIRED is computed on read when an acquired record’s lockedUntil is in the past; it is not persisted by a sweeper in v1. History recorder failures are isolated from the protected business action, so monitor the sink separately.
Release sources
Section titled “Release sources”leader-core/src/main/kotlin/io/bluetape4k/leader/LeaderLease.ktleader-core/src/main/kotlin/io/bluetape4k/leader/LeaderState.ktleader-core/src/main/kotlin/io/bluetape4k/leader/history/LeaderHistoryStatus.kt