mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
*: make backend outside kv
KV and lease will share the same backend. Thus we need to make backend outside KV.
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
|
||||
"github.com/coreos/etcd/Godeps/_workspace/src/github.com/spf13/cobra"
|
||||
"github.com/coreos/etcd/storage"
|
||||
"github.com/coreos/etcd/storage/backend"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -30,7 +31,8 @@ var (
|
||||
)
|
||||
|
||||
func initStorage() {
|
||||
s = storage.NewStore("storage-bench", time.Duration(batchInterval), batchLimit)
|
||||
be := backend.New("storage-bench", time.Duration(batchInterval), batchLimit)
|
||||
s = storage.NewStore(be)
|
||||
os.Remove("storage-bench") // boltDB has an opened fd, so removing the file is ok
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user