Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
29bd145f
Commit
29bd145f
authored
Jun 10, 2019
by
liuyuhang
Committed by
vipwzw
Jun 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add kvmvcc log
parent
917c81b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
kvmvccdb.go
plugin/store/kvmvccmavl/kvmvccdb.go
+5
-2
No files found.
plugin/store/kvmvccmavl/kvmvccdb.go
View file @
29bd145f
...
@@ -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 获取当前最大高度
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment