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

docs: remove default iavl-cache-size invalid value #14486

Conversation

mdumais-stratos
Copy link
Contributor

@mdumais-stratos mdumais-stratos commented Jan 4, 2023

Description

Closes: #11382

The memory leak from #11382 is caused by the iavl-cache-size being too large (500 000 by default). HistoricalInfo objects therefore accumulate in memory over time.

There is already a solution added by this PR to change the iavl-cache-size. It requires using the server.DefaultBaseappOptions, or directly calling baseapp.SetIAVLCacheSize when creating the app object, and changing the iavl-cache-size value in app.toml.

This PR updates the docs to make it clear that the iavl-cache-size parameter is a number of nodes, and not an amount of data.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct docs: prefix in the PR title
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the documentation writing guidelines
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct docs: prefix in the PR title
  • confirmed all author checklist items have been addressed
  • confirmed that this PR only changes documentation
  • reviewed content for consistency
  • reviewed content for thoroughness
  • reviewed content for spelling and grammar
  • tested instructions (if applicable)

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

ACK

@tac0turtle
Copy link
Member

the default here https://github.com/cosmos/cosmos-sdk/blob/main/store/iavl/store.go#L25 is probably what we should also change to be smaller

@alexanderbez alexanderbez enabled auto-merge (squash) January 5, 2023 17:13
@alexanderbez alexanderbez added the backport/v0.47.x PR scheduled for inclusion in the v0.47's next stable release label Jan 5, 2023
@alexanderbez alexanderbez merged commit 465e0f6 into cosmos:main Jan 5, 2023
mergify bot pushed a commit that referenced this pull request Jan 5, 2023
julienrbrt pushed a commit that referenced this pull request Jan 5, 2023
…14517)

Co-authored-by: Marc-Antoine Dumais <62179452+mdumais-stratos@users.noreply.github.com>
@mdumais-stratos mdumais-stratos deleted the mdumais/11382-iavl-cache-size-docs-update branch January 5, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.47.x PR scheduled for inclusion in the v0.47's next stable release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Leak in x/staking/keeper HistoricalInfo
5 participants