mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #10193 from johncming/master
mvcc/backend: code format optimization
This commit is contained in:
commit
a27a73e448
@ -399,14 +399,7 @@ func (b *backend) defrag() error {
|
||||
plog.Panicf("cannot open database at %s (%v)", dbp, err)
|
||||
}
|
||||
}
|
||||
b.batchTx.tx, err = b.db.Begin(true)
|
||||
if err != nil {
|
||||
if b.lg != nil {
|
||||
b.lg.Fatal("failed to begin tx", zap.Error(err))
|
||||
} else {
|
||||
plog.Fatalf("cannot begin tx (%s)", err)
|
||||
}
|
||||
}
|
||||
b.batchTx.tx = b.unsafeBegin(true)
|
||||
|
||||
b.readTx.reset()
|
||||
b.readTx.tx = b.unsafeBegin(false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user