mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-30 19:06:21 +08:00
Added RWMutex to keysWithExpiry in order to improve thread safety
This commit is contained in:
@@ -119,6 +119,10 @@ 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