storage: support recovering from backend
We want the KV to support recovering from backend to avoid additional pointer swap. Or we have to do coordination between etcdserver and API layer, since API layer might have access to kv pointer and use a closed kv.
This commit is contained in:
@ -867,10 +867,10 @@ func TestConcurrentApplyAndSnapshotV3(t *testing.T) {
|
||||
|
||||
be, tmpPath := backend.NewDefaultTmpBackend()
|
||||
defer func() {
|
||||
be.Close()
|
||||
os.RemoveAll(tmpPath)
|
||||
}()
|
||||
s.kv = dstorage.New(be, &s.consistIndex)
|
||||
s.be = be
|
||||
|
||||
s.start()
|
||||
defer s.Stop()
|
||||
|
Reference in New Issue
Block a user