-
Notifications
You must be signed in to change notification settings - Fork 156
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
Avoid rollbacks on restarts #1190
Comments
Yes, it will reduce the need for rollbacks, but is likely to slow down sync speeds even further. In epoch
That is 5 minutes out of the total of 194 minutes it took to sync that epoch. More frequent snapshots, means more time taken storing them on disk. A partial solution to this is to off load it to another thread, but since The correct solution is for |
There are a bunch of real world scenarios where signal handlers and on-exit functions do not get called. For example the machine looses power or the process is killed by the kernel OOM handler. I am sure there are many others. |
Sure, we're trying to catch the most common case with a normal exit an improve it.
That something we should push to the node teams, but can take quite a while to design and implement. In the meantime we can try to improve the situation on our side. |
IMO this is a bad idea. If we produce a workaround for this in |
It's hard to agree that it's a bad idea to improve things on our side in any context. The benefits of spliting the packages in 2 were questionable. However here, there are direct benefits from having fast restarts. It's one of the most requested improvements actually. |
I am crafting a Helm chart for
If I need to recreate the Pod, At the very least, |
If you don't need the historic rewards and other data described in https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/configuration.md#--disable-ledger which come from the ledger you can already use the |
This has been fixed in #1266 |
On restarts DBSync finds the latest point for which there is both a snapshot and its data are already inserted in the db. It deletes newer snapshots and data of newer blocks and starts syncing from this point. Deleting newer data can be avoided, if DBSync could instead apply the ledger rules from the snapshot until it reaches a compatible db tip. Before applying the rules, db-sync should first find the db tip and make sure it's on the node chain.
Other ways to avoid big rollbacks on restarts is to store more frequent snapshots or to store snapshots on signal handlers while exiting.
The text was updated successfully, but these errors were encountered: