Skip to content

Commit

Permalink
close db write batch after use (#4379)
Browse files Browse the repository at this point in the history
Closes: #4381
  • Loading branch information
Stumble authored and Alessio Treglia committed May 22, 2019
1 parent 995aea8 commit 65be4db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .pending/improvements/sdk/4379-close-db-write-
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#4379 close db write batch.
1 change: 1 addition & 0 deletions store/rootmulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ func (rs *Store) Commit() types.CommitID {

// Need to update atomically.
batch := rs.db.NewBatch()
defer batch.Close()
setCommitInfo(batch, version, commitInfo)
setLatestVersion(batch, version)
batch.Write()
Expand Down

0 comments on commit 65be4db

Please sign in to comment.