Commit 29bd145f authored by liuyuhang's avatar liuyuhang Committed by vipwzw

add kvmvcc log

parent 917c81b7
...@@ -98,7 +98,7 @@ func (mvccs *KVMVCCStore) Get(datas *types.StoreGet) [][]byte { ...@@ -98,7 +98,7 @@ func (mvccs *KVMVCCStore) Get(datas *types.StoreGet) [][]byte {
values := make([][]byte, len(datas.Keys)) values := make([][]byte, len(datas.Keys))
version, err := mvccs.mvcc.GetVersion(datas.StateHash) version, err := mvccs.mvcc.GetVersion(datas.StateHash)
if err != nil { if err != nil {
kmlog.Error("Get version by hash failed.", "hash", common.ToHex(datas.StateHash)) kmlog.Error("Get version by hash failed.", "hash", common.ToHex(datas.StateHash), "error:", err)
return values return values
} }
for i := 0; i < len(datas.Keys); i++ { for i := 0; i < len(datas.Keys); i++ {
...@@ -262,7 +262,10 @@ func (mvccs *KVMVCCStore) saveKVSets(kvset []*types.KeyValue, sync bool) { ...@@ -262,7 +262,10 @@ func (mvccs *KVMVCCStore) saveKVSets(kvset []*types.KeyValue, sync bool) {
storeBatch.Set(kvset[i].Key, kvset[i].Value) storeBatch.Set(kvset[i].Key, kvset[i].Value)
} }
} }
storeBatch.Write() err := storeBatch.Write()
if err != nil {
kmlog.Info("KVMVCCStore saveKVSets", "Write error", err)
}
} }
// GetMaxVersion 获取当前最大高度 // GetMaxVersion 获取当前最大高度
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment