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

feat: make LazyLoadVersion validate InitialVersion the same as LoadVersion #638

Merged
merged 6 commits into from
Jan 18, 2023

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Dec 1, 2022

Improve startup time of archive nodes.

  • check opts.InitialVersion in LazyLoadVersion
  • add API LazyLoadVersionForOverwriting

Closes: #637

Need to enable the lazy mode at cosmos-sdk: cosmos/cosmos-sdk#14189
Unit tests passed, running alright on our production nodes, not sure of other side effects.

@yihuang yihuang changed the title support lazy mode in LoadVersion feat: support lazy mode in LoadVersion Dec 1, 2022
nodedb.go Fixed Show fixed Hide fixed
nodedb.go Fixed Show fixed Hide fixed
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Dec 1, 2022

This pull request introduces 2 alerts when merging 8c7a745 into 12381ab - view on LGTM.com

new alerts:

  • 2 for Unreachable statement

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. It looks like GitHub code scanning with CodeQL is already set up for this repo, so no further action is needed 🚀. For more information, please check out our post on the GitHub blog.

@yihuang yihuang changed the title feat: support lazy mode in LoadVersion feat: make LazyLoadVersion do the same thing as LoadVersion Dec 7, 2022
CHANGELOG.md Show resolved Hide resolved
@yihuang
Copy link
Collaborator Author

yihuang commented Jan 16, 2023

@alexanderbez @tac0turtle Hi, may I know what's your optional on this change?
it's a simple change, the end purpose is to add iavl-lazy-loading option to sdk(cosmos/cosmos-sdk#14189), which provides a huge UX improvement on node start up.

Copy link
Member

@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.

could we get a test case on this feature, seems like some behaviour changed but the tests didnt

@yihuang
Copy link
Collaborator Author

yihuang commented Jan 17, 2023

could we get a test case on this feature, seems like some behaviour changed but the tests didnt

unit test added, and I checked it fails on master branch for this error: "An error is expected but got nil."

@yihuang yihuang changed the title feat: make LazyLoadVersion do the same thing as LoadVersion feat: make LazyLoadVersion validate InitialVersion the same as LoadVersion Jan 17, 2023
nodedb.go Outdated Show resolved Hide resolved
@tac0turtle
Copy link
Member

@yihuang backport?

@tac0turtle tac0turtle merged commit d8e1e38 into cosmos:master Jan 18, 2023
@yihuang
Copy link
Collaborator Author

yihuang commented Jan 18, 2023

@yihuang backport?

yes, please.

@yihuang yihuang deleted the lazy-by-default branch January 18, 2023 14:58
@yihuang
Copy link
Collaborator Author

yihuang commented Jan 29, 2023

it seems we forgot to backport this one? @tac0turtle

@tac0turtle
Copy link
Member

no problem, didnt cut final release

@tac0turtle
Copy link
Member

@Mergifyio backport release/v0.19.x

@tac0turtle
Copy link
Member

ill fix the bot, not sure what's up

@mergify
Copy link
Contributor

mergify bot commented Jan 29, 2023

backport release/v0.19.x

✅ Backports have been created

@tac0turtle
Copy link
Member

@Mergifyio backport release/v0.20.x

@mergify
Copy link
Contributor

mergify bot commented Jan 30, 2023

backport release/v0.20.x

✅ Backports have been created

tac0turtle added a commit that referenced this pull request Jan 30, 2023
…oadVersion` (backport #638) (#669)

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
tac0turtle added a commit that referenced this pull request Feb 1, 2023
…oadVersion` (backport #638) (#666)

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
ankurdotb pushed a commit to cheqd/iavl that referenced this pull request Feb 28, 2023
…oadVersion` (backport cosmos#638) (cosmos#666)

Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iavl start up time is slow
5 participants