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
Update pebble datastore #2018
Update pebble datastore #2018
Conversation
Thank you for this. It seems that pebble can't auto migrate the store:
(I did change the Also this test data should be updated with the new version. |
I'll try to export the state of one of our node, and reimport it in an up to date store to test the patch. |
This reverts commit dc6ff93.
I have to revert to pebble v1.0.0 then. Which should be newer than latest release but older than what we had on master. |
@Mayeu ok, this should be compatible with your existing DB. This is the latest pebble version we can use and we will have to stick with that. Anything newer has to go as a new pebble2 datastore backend, as there is no tooling to upgrade existing databases. Can you try this one? v1.0.0 would be a downgrade, which would also force me to revert the 32-bit-build fixes etc. |
I'll try that and report back. Thank you. |
@hsanjuan: when I tried to export & reimport the state earlier (with After around 30 min of being stuck, I assume this was definitely not going to work so I stopped trying to export. That said, exporting everything was possible with |
@hsanjuan: running the patched version starts as planned. But around 30 minutes after starting, it stop committing things up. That said, I may have found something unexpected in pebble configuration. In the Here is the content of the
|
hmm did that fix anything? Do you have any idea why it was 0? |
Sorry, I forgot to send a message yesterday evening. Changing that seems to have done the trick. As soon as I started the daemon with this configuration change, I saw compaction happened in the pebble stats and data moved through the cache layer. The daemon has been running for 20h without locks up now. (Before it was locking around 1h in.) I have no clue why it suddenly got to 0. When I did the setup, I generated all the default configuration with |
@hsanjuan: about migrating the datastore, pebble's documentation state that:
And then there is an array describing which versions have migration. So I tried to change that option in the
But jumping from 1 to 7, then 7 to 10, and now 10 to 14 works. One of our nodes is now running the datastore v14 format. So a migration tool could be created by looking at the current store version, and opening the DB as much as needed to reach the highest version supported by that version of pebble. In our case, even blocking migrations were basically instant. |
I thought it gave this error: #2018 (comment) when upgrading. Anyways, is there a version where things work for you? |
Ha no, this error was because the pebble version in ipfs-cluster did not support the version 1 datastore format anymore. That was with commit dc6ff93 (pebble v0.0.0-20240109173520-f93e739e51c8). After you downgraded pebble to v0.0.0-20231218155426-48b54c29d8fe in commit 46fd8e5 the version 1 store was loaded correctly, and I was able to run the datastore migration. |
And the deadlock? |
ok, so this PR probably solves the deadlock problem "as is". And then I have somehow to find a way to move FormatMajorVersion up to 13 in multiple steps so that datastore upgrades itself to a point where it is ready to take the v2-series (which start at FormatMajorVersion 14). Right? |
Yes
You won't be able to jump to 13 because it does not come with a migration you'll have to target FormatMajorVersion 14. (Only 6, 7, 10, and 14 have migration apparently.) And based on my test, you should be able to directly jump to 7. Don't hesitate to poke me in the PR about the migration. I can help test it as we still have a node using the FormatMajorVersion 1. |
I don't think the pebble version in this commit supports V14? Anyways, I'll check and probably add a specific command to upgrade. |
Hmm, I was sure to have upgraded one node up to V14, but after double-checking it seems to be on V10 only. So yeah, not sure anymore if I tried with V14. |
No description provided.