Unify shared code (and constants) with cindex package.

This commit is contained in:
Piotr Tabor
2021-04-29 09:34:54 +02:00
parent f53b70facb
commit e90504fe62
4 changed files with 25 additions and 31 deletions

View File

@ -36,6 +36,7 @@ import (
"go.etcd.io/etcd/server/v3/etcdserver/api/snap"
"go.etcd.io/etcd/server/v3/etcdserver/api/v2error"
"go.etcd.io/etcd/server/v3/etcdserver/api/v2store"
"go.etcd.io/etcd/server/v3/etcdserver/cindex"
"go.etcd.io/etcd/server/v3/mvcc"
"go.etcd.io/etcd/server/v3/mvcc/backend"
"go.etcd.io/etcd/server/v3/wal"
@ -91,7 +92,7 @@ func migrateCommandFunc(cmd *cobra.Command, args []string) {
}()
readKeys(reader, be)
mvcc.UpdateConsistentIndex(be, index)
cindex.UpdateConsistentIndex(be.BatchTx(), index)
err := <-errc
if err != nil {
fmt.Println("failed to transform keys")