-
Notifications
You must be signed in to change notification settings - Fork 102
Getting non-matching LTX checksum on fresh volume #134
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
Comments
@kentcdodds Thanks for writing this up. I realized I had an old version (
I'm surprised to see that error on a brand new volume as it happens when LiteFS is validating the existing database state. Can you retry with the new |
Thanks! I've still go the same issue: https://github.com/kentcdodds/kentcdodds.com/actions/runs/3322212924/jobs/5491067040 |
I'm a bit stuck on deploying LiteFS until this is resolved. Any ideas? |
@kentcdodds The error is strange because it is essentially saying that the database state on disk exists (checksum
Can you try removing the volumes on your staging set up and re-deploying and seeing if you still have the same error? |
I think I've figured out what's going on. When I create the new volume, my old (pre litefs) app restarts and applies migrations to the new db in the volume which is what causes this issue. What I'm trying now is to deploy a version of my app that does not do anything to the database so then I can have that one running when I recreate the volume, and then deploy the litefs version. Will let you know what happens. |
Ok, cool. Thanks for digging into it more. I also created an issue for keeping |
I pushed up a PR for it so it's available at |
Good news! It's running now. Now I'm going to try to create more regions. It just occurred to me that I'll need to create volumes for the regions first right? If I try to deploy my app to a region without a persistent volume things will break right? |
Interestingly, I added a volume to
So I just scaled up to a count of Now I just need to figure out how to determine the primary region via that |
I got this again on a new deploy of the app:
I'm not sure what I'm doing wrong :( |
Here's the failed build, not sure how useful it'll be: https://github.com/kentcdodds/kentcdodds.com/actions/runs/3324709637/jobs/5496681848 |
@kentcdodds This is a known bug that can occur on restart with the rollback journal. I have a fix for this one. We should have a v0.3.0 release coming early next week that will have WAL support and stability fixes in it. |
In case, it's helpful, I tried the SHA release of litefs just now and got the same error: https://github.com/kentcdodds/kentcdodds.com/actions/runs/3351908722/jobs/5553715931#step:6:78 |
@kentcdodds Thanks for trying it. Is this running on a clean volume or the existing one? |
Existing one |
I added a possible fix for this with #157. Although, depending on the exact nature of the issue, #158 could help too. It's hard to say without looking at the data files in the LiteFS directory. This may resolve the issue on the existing volume but if it's a bug that was resolved by #158 then you'll need to wipe the volume and start with a clean database. I'm going to close this for now but please reopen if you hit the issue again. Thanks, @kentcdodds! |
well, my production instance is now dead, been up for 7 months I have 1 container and 1 volume |
neither I'm able to connect to the instance, it's in |
@AlexBlokh I'm sorry to hear that. Do you know what version of LiteFS you were running? Also, you may be able to recover your underlying database. If you copy out the # Replace LITEFS_DATA_DIR & #DBNAME with your appropriate values.
# You only need to copy the "wal" file if you're using WAL mode and if the file exists.
$ cp $LITEFS_DATA_DIR/dbs/$DBNAME/database /tmp/db
$ cp $LITEFS_DATA_DIR/dbs/$DBNAME/wal /tmp/db-wal
# Open using SQLite & run an integrity check.
$ sqlite3 /tmp/db
sqlite> PRAGMA integrity_check If it returns |
https://github.com/kentcdodds/kentcdodds.com/actions/runs/3316512422/jobs/5478478215
This volume is brand new and completely empty. @benbjohnson said this is a bug that needs fixing and asked me to open this issue. More context at https://www.youtube.com/watch?v=vTNPJGKqsYQ
Thanks!
The text was updated successfully, but these errors were encountered: