Skip to content

fix: prune cmd should disable async pruning#24090

Merged
technicallyty merged 7 commits into
release/v0.53.xfrom
technicallyty/23810/async-pruning
Mar 27, 2025
Merged

fix: prune cmd should disable async pruning#24090
technicallyty merged 7 commits into
release/v0.53.xfrom
technicallyty/23810/async-pruning

Conversation

@technicallyty
Copy link
Copy Markdown
Member

Description

Closes: #23810

fix from #22656


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 type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • 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.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

@github-actions

This comment has been minimized.

Comment thread store/rootmulti/store.go
store, err = iavl.LoadStoreWithInitialVersion(db, rs.logger, key, id, params.initialVersion, rs.iavlCacheSize, rs.iavlDisableFastNode, rs.metrics)
}

store, err := iavl.LoadStoreWithOpts(db, rs.logger, key, id, params.initialVersion, rs.iavlCacheSize, rs.iavlDisableFastNode, rs.metrics, iavltree.AsyncPruningOption(!rs.iavlSyncPruning))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this is the main place we use !rs.iavlSyncPruning should we just have an option that is rs.iavlAsyncPruning instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not sure what you mean

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lets discuss sync

Copy link
Copy Markdown
Member Author

@technicallyty technicallyty Mar 25, 2025

Choose a reason for hiding this comment

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

ok dug more here, this has to do with default values. we shouldn't really ever expect anyone to set this value, and i've updated comments to reflect that here.

that means the default value false will always take effect, enabling the async behavior to be default.

in short, we want the naming of the flag to reflect what the default value implies. explicit setting of the value should only ever be done from the prune cmd. i tried thinking of other ways to set this value, but i believe this is the most straightforward, low friction way to do it.

@technicallyty technicallyty requested a review from aljo242 March 24, 2025 22:21
@technicallyty technicallyty added this pull request to the merge queue Mar 27, 2025
Merged via the queue into release/v0.53.x with commit cfda49b Mar 27, 2025
@technicallyty technicallyty deleted the technicallyty/23810/async-pruning branch March 27, 2025 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants