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
Slot rollback take longer than syncing the db #397
Comments
If you look at Whenever the number of slots to roll back is large (like you have there) it will be slow due to #256 . The solution (while #256 remains unfixed) is to drop and recreate the database. That will take significantly less than 24m hours. |
Problem for me with this is that it won't ever catch up tip because it falls into one of these rollbacks no matter how many times I've tried a sync from the scratch :( |
The only way this rollback could happen while syncing is if db-sync or the node it is connected to is being stopped and restarted (and even then is unlikely). If there is a problem, I need to be able to recreate it. Unfortunately, I have synced from scratch at least 50 times and I have not seen anything like this even once. |
Maybe also because of some postgres crash/hang up? I've been trying to sync on very low resources instances and also on this "weird" setup where I share the socket through TCP with I've upgraded my instances to catch up tip and will then downgrade. Crossing fingers :D |
Yes, that is possible.
That could easily be the problem. Also, if you do this, you MUST say so in the ticket. . |
I did on a different one (#304), but IMHO it's not very relevant to this one since it's the cause for the rollback to happen; not for the rollback to be slow. |
I deal with a large number of tickets and it is easy to forget minor details. If there is a special circumstance with a ticket, that circumstance MUST be noted in every ticket where it is relevant. Secondly, if Finally, for any problem to be fixed, I must be provided with sufficient information to recreate the problem. In most cases, if I cannot reproduce the problem, I cannot fix the problem. |
I can confirm that this happens whenever I need to restart db-sync 6.0.0 or start it from a copied postgres db. Notice that it wants to roll back to slot 0. [db-sync-node:Info:72] [2020-11-10 10:05:59.84 UTC] Starting chainSyncClient Db-sync 5.0.3's output looks the following: What's the problem @erikd ? |
I totally admit that it will happen in the later case. For the former case, I have personally restarted it (with the existing database and compatible state dir) hundreds of times without a rollback. The important distinction is that there is a directory of state information (as specified by |
I'm starting it in docker compose similarly to https://github.com/input-output-hk/cardano-rest/blob/master/docker-compose.yml#L40, how do you specify the state dir? Edit: found the answer at 6187081 |
I have a PR which adds better logging. Its not a solution but should be more informative. |
I had same circumstance after upgrading 6.0.0 (I used docker-compose.yaml in cardano-rest repository) only difference between cardano-db-sync and cardano-rest is 6187081#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3 after adding that and recreating postgres, problem disappear |
@sjlee1125 if something is missing from the |
mine took 10 hours to rollback then I just stopped and resynced because that is way faster |
After starting cardano-db-sync:
Even after 24h no change is made.
The text was updated successfully, but these errors were encountered: