-
Notifications
You must be signed in to change notification settings - Fork 161
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
Improve rollbacks #570
Comments
This was definitely not a problem until just recently. I have had |
Did you also change db-sync version recently? |
Yes, in fact this is running from the I am syncing with a version built from |
This is weird. I have now had a |
This is weird. I have now had a |
There are some issues in how db-sync reacts to rollbacks.
After https://github.com/input-output-hk/cardano-db-sync/pull/499/files#diff-2700a1bfb3d0c533301dcae492070ff90357e45ac6ee16945ed800929d9a985fL253 we no longer delete ledger files in case of a rollback. This function
deleteNewerLedgerStateFiles
https://github.com/input-output-hk/cardano-db-sync/pull/499/files#diff-2700a1bfb3d0c533301dcae492070ff90357e45ac6ee16945ed800929d9a985fR158 that was introduced at the same pr, is only called on startup and not after a rollback. Also it takes aSlotNo
, instead of aPoint
, which means that we may not delete a file, because there is a slot collision.I think the issue exists even before this and it has to do with the way we use the ChainSync protocol. When we have to rollback to a point, it's possible that we don't have a ledger state snapshot. In this case we have to try to find an intersection
SendMsgFindIntersect
with the points we have. Currently we only send this on startup, which means the only way we can restore is to restart db-sync.The text was updated successfully, but these errors were encountered: