Skip to content

feat: Uses BatchWithFlusher in iavl tree#807

Merged
tac0turtle merged 4 commits intocosmos:masterfrom
notional-labs:batchflushing
Aug 11, 2023
Merged

feat: Uses BatchWithFlusher in iavl tree#807
tac0turtle merged 4 commits intocosmos:masterfrom
notional-labs:batchflushing

Conversation

@catShaark
Copy link
Contributor

This PR replace the use of normal dbm.Batch with BatchWithFlusher in iavl tree
It also hard code the value of flushthreshold to 100KB

@catShaark catShaark requested a review from a team August 8, 2023 17:20
@catShaark catShaark changed the title Uses BatchWithFlusher in iavl tree Feat: Uses BatchWithFlusher in iavl tree Aug 8, 2023
@catShaark catShaark changed the title Feat: Uses BatchWithFlusher in iavl tree feat: Uses BatchWithFlusher in iavl tree Aug 8, 2023
Copy link
Contributor

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

LGTM thank you

Copy link
Contributor

@cool-develope cool-develope left a comment

Choose a reason for hiding this comment

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

overall looks good to me, except why hard code the flushThreshold?

@catShaark
Copy link
Contributor Author

catShaark commented Aug 10, 2023

That's because I discussed with marko and we decide to hard code the value to be the best option based on benchmark result run on osmosis node

@julienrbrt
Copy link
Contributor

+1 on @cool-develope comment.

Given that newNodeDB takes Options we could add an option in here: https://github.com/notional-labs/iavl/blob/a945f5f903800a214d30e55f87ca96cc6bc78051/options.go#L71-L89 and use 100000 in the DefaultOptions. If going this way, we should make them variadic so you don't end up overwriting that value to 0 by defining new options.

@tac0turtle
Copy link
Contributor

@julienrbrt you fine with merging this and then i can make the changes.

@julienrbrt
Copy link
Contributor

@julienrbrt you fine with merging this and then i can make the changes.

Works! We need changelogs as well to reflect some API breaks from here in the follow-up

@tac0turtle tac0turtle merged commit b42a0bc into cosmos:master Aug 11, 2023
@julienrbrt
Copy link
Contributor

@Mergifyio backport release/1.x.x

@mergify
Copy link
Contributor

mergify bot commented Aug 11, 2023

backport release/1.x.x

❌ No backport have been created

Details
  • Backport to branch release/1.x.x failed

GitHub error: Branch not found

@julienrbrt
Copy link
Contributor

@Mergifyio backport release/v1.x.x

@tac0turtle
Copy link
Contributor

@Mergifyio backport release/v1.x.x

@mergify
Copy link
Contributor

mergify bot commented Aug 11, 2023

backport release/v1.x.x

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Aug 11, 2023
tac0turtle pushed a commit that referenced this pull request Aug 11, 2023
Co-authored-by: khanh-notional <50263489+catShaark@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants