Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

[R4R]libs/db: close batch (#3397) #54

Merged
merged 1 commit into from
Mar 28, 2019
Merged

[R4R]libs/db: close batch (#3397) #54

merged 1 commit into from
Mar 28, 2019

Conversation

unclezoro
Copy link
Collaborator

@unclezoro unclezoro commented Mar 13, 2019

I have see one of our seed in site 3 suffer from memory leak problem.

releated to tendermint/tendermint#2821.

And tendermint find use Clevel db will cause memory leak, maybe releated.
cherry-pick from tendermint . tendermint/tendermint#3397

ClevelDB requires closing when WriteBatch is no longer needed, https://godoc.org/github.com/jmhodges/levigo#WriteBatch.Close

Fixes the memory leak in cosmos/cosmos-sdk#3842

  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md

ClevelDB requires closing when WriteBatch is no longer needed, https://godoc.org/github.com/jmhodges/levigo#WriteBatch.Close

Fixes the memory leak in cosmos/cosmos-sdk#3842
@unclezoro unclezoro changed the title libs/db: close batch (#3397) [R4R]libs/db: close batch (#3397) Mar 15, 2019
@unclezoro
Copy link
Collaborator Author

@ackratos @xiangdotli Please note this when test cleveldb

@unclezoro unclezoro self-assigned this Mar 15, 2019
Copy link
Contributor

@darren-liu darren-liu left a comment

Choose a reason for hiding this comment

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

please get @yutianwu and/or @ackratos review as well.

@unclezoro unclezoro merged commit 3fe8521 into develop Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants