mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-31 03:16:26 +08:00
Implemented eviction algorithm that samples a configurable number of keys with TTLs (default 20) at a configurable interval (default 100ms) and deletes the keys that are expired.
This commit is contained in:
@@ -121,10 +121,6 @@ func (r *Raft) RaftInit(ctx context.Context) {
|
||||
}
|
||||
|
||||
r.raft = raftServer
|
||||
|
||||
// TODO
|
||||
// Listen on leadership change channel and initiate key eviction goroutine
|
||||
// if current node is the leader.
|
||||
}
|
||||
|
||||
func (r *Raft) Apply(cmd []byte, timeout time.Duration) raft.ApplyFuture {
|
||||
|
||||
Reference in New Issue
Block a user