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

versiondb lastest version don't match iavl latest version #1301

Closed
windycrypto opened this issue Jan 22, 2024 · 1 comment · Fixed by #1304
Closed

versiondb lastest version don't match iavl latest version #1301

windycrypto opened this issue Jan 22, 2024 · 1 comment · Fixed by #1304

Comments

@windycrypto
Copy link

windycrypto commented Jan 22, 2024

Describe the bug

recently I reboot our server, then cronosd reports the following error on starting:

"versiondb lastest version 12063409 don't match iavl latest version 12063413"

I guess maybe cronosd doesn't stop gracefully when I reboot the server, maybe I should terminate cronosd before reboot the server. This is not 100% reproducible, a normal restart of the cronosd doesn't got this issue.
While despite that, could we have a self-healing approach to auto fix the mismatched version instead of failed to start, like rollback iavl version to match versiondb?

cronosd version: v1.0.14

@yihuang
Copy link
Collaborator

yihuang commented Jan 22, 2024

yes, this is known issue with ungraceful shutdown, for now there are some tricks you can do to recover fast, for example for rocksdb:

$ ldb put "s/latest" $(printf "0x%X" 12063409) --value_hex --db=/path/to/application.db

ldb is a tool builtin rocksdb repo, you can built yourself, or if you use nix, we also provide it in cronos repo: nix profile install github:crypto-org-chain/cronos#rocksdb.tools.

yihuang added a commit to yihuang/cronos that referenced this issue Jan 26, 2024
Closes: crypto-org-chain#1301

Solution:
- do fsync when writing versiondb
github-merge-queue bot pushed a commit that referenced this issue Jan 29, 2024
* Problem: versiondb lag behind when os reboot

Closes: #1301

Solution:
- do fsync when writing versiondb

* Update CHANGELOG.md

Signed-off-by: yihuang <huang@crypto.com>

* relax version checking

* changelog

---------

Signed-off-by: yihuang <huang@crypto.com>
mmsqe pushed a commit to mmsqe/cronos that referenced this issue Jan 30, 2024
* Problem: versiondb lag behind when os reboot

Closes: crypto-org-chain#1301

Solution:
- do fsync when writing versiondb

* Update CHANGELOG.md

Signed-off-by: yihuang <huang@crypto.com>

* relax version checking

* changelog

---------

Signed-off-by: yihuang <huang@crypto.com>
mmsqe pushed a commit to mmsqe/cronos that referenced this issue Jan 30, 2024
* Problem: versiondb lag behind when os reboot

Closes: crypto-org-chain#1301

Solution:
- do fsync when writing versiondb

* Update CHANGELOG.md

Signed-off-by: yihuang <huang@crypto.com>

* relax version checking

* changelog

---------

Signed-off-by: yihuang <huang@crypto.com>
mmsqe added a commit that referenced this issue Jan 30, 2024
…1306)

* Problem: memiavl rootmulti store access map concurrently (#1302)

* Problem: memiavl rootmulti store access map concurrently

Solution:
- code refactoring

* Update CHANGELOG.md

Signed-off-by: yihuang <huang@crypto.com>

---------

Signed-off-by: yihuang <huang@crypto.com>

* mod tidy

* Problem: versiondb lag behind when os reboot (#1304)

* Problem: versiondb lag behind when os reboot

Closes: #1301

Solution:
- do fsync when writing versiondb

* Update CHANGELOG.md

Signed-off-by: yihuang <huang@crypto.com>

* relax version checking

* changelog

---------

Signed-off-by: yihuang <huang@crypto.com>

* fix lint

---------

Signed-off-by: yihuang <huang@crypto.com>
Co-authored-by: yihuang <huang@crypto.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 a pull request may close this issue.

2 participants