mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-20 22:49:36 +08:00
Implemented restore function in standalone snapshot engine
This commit is contained in:
@@ -245,8 +245,14 @@ func (server *Server) Start(ctx context.Context) {
|
||||
GetState: server.GetState,
|
||||
SetLatestSnapshotMilliseconds: server.SetLatestSnapshot,
|
||||
GetLatestSnapshotMilliseconds: server.GetLatestSnapshot,
|
||||
CreateKeyAndLock: server.CreateKeyAndLock,
|
||||
KeyUnlock: server.KeyUnlock,
|
||||
SetValue: server.SetValue,
|
||||
})
|
||||
server.SnapshotEngine.Start()
|
||||
if err := server.SnapshotEngine.Restore(ctx); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
server.SnapshotEngine.Start(ctx)
|
||||
}
|
||||
|
||||
server.StartTCP(ctx)
|
||||
|
Reference in New Issue
Block a user