Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R4R: Close batch after write in nodedb #7

Merged
merged 3 commits into from
Jun 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

[[constraint]]
name = "github.com/tendermint/tendermint"
version = "v0.27.0-dev1"
source = "github.com/irisnet/tendermint"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the new version of tendermint is released, replace the branch by version.

branch = "develop"

[prune]
go-tests = true
Expand Down
1 change: 1 addition & 0 deletions nodedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ func (ndb *nodeDB) Commit() {
defer ndb.mtx.Unlock()

ndb.batch.Write()
ndb.batch.Close()
ndb.batch = ndb.db.NewBatch()
}

Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package iavl

// Version of iavl.
const Version = "0.12.0"
const Version = "0.12.1"
2 changes: 1 addition & 1 deletion with_gcc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ import (
)

func BenchmarkImmutableAvlTreeCLevelDB(b *testing.B) {
db := db.NewDB("test", db.CLevelDBBackendStr, "./")
db := db.NewDB("test", db.CLevelDBBackend, "./")
benchmarkImmutableAvlTreeWithDB(b, db)
}