Giter Site home page Giter Site logo

Comments (6)

zze0s avatar zze0s commented on September 27, 2024 1

As discussed in the other issue the tag issues has already been resolved.

The recovered db issue not working as intended I think might be because we use a SQLite built-in key-value sort of store, PRAGMA to set the schema version. Maybe that isn't recovered correctly with the .recover command 🤔

from autobrr.

rpatterson avatar rpatterson commented on September 27, 2024

I was able to workaround this by letting autobrr initialize a fresh clean DB and then loading the recovered SQL into that DB:

$ sqlite3 ./autobrr/config/autobrr.db .recover >"./autobrr/config/autobrr.sql.~repaired~"
$ mv -v --backup=numbered ./autobrr/config/autobrr.db ./autobrr/config/autobrr.db.~corrupt~
renamed './autobrr/config/autobrr.db' -> './autobrr/config/autobrr.db.~corrupt~'
+ docker compose start autobrr
[+] Running 1/1
 ✔ Container autobrr  Started                                                                                                                                                            0.2s
+ sleep 2
+ docker compose stop autobrr
[+] Stopping 1/1
 ✔ Container autobrr  Stopped                                                                                                                                                            0.2s
$ sqlite3 ./autobrr/config/autobrr.db <"./autobrr/config/autobrr.sql.~repaired~"

I'm still unclear on why loading the recovered SQL into an uninitialized DB results in the fatal DB migration error. There may still be a bug there. In the meantime, hopefully this will be helpful to other users. Maybe add it to the docs?

from autobrr.

zze0s avatar zze0s commented on September 27, 2024

Hi! Do you have any logs from before the fatal log? This was with an existing db correct? And you are running the latest tag that for unknown reason was built with the RC release 🤔

from autobrr.

rpatterson avatar rpatterson commented on September 27, 2024

Hi! Do you have any logs from before the fatal log?

@zze0s No, I have no idea how long ago the corruption started, but I know it was at least long enough that no currently available logs cover it. Sorry.

This was with an existing db correct?

Yes.

And you are running the latest tag that for unknown reason was built with the RC release 🤔

That's copied from this project's README. I agree that part of the README should be updated. Unfortunately, I don't see any tag in this project's registry that would keep current with the latest final release. Something should be added to the build process to tag final releases with a separate tag. It should also probably tag major, and maybe even minor versions.

from autobrr.

zze0s avatar zze0s commented on September 27, 2024

@zze0s No, I have no idea how long ago the corruption started, but I know it was at least long enough that no currently available logs cover it. Sorry.

Alright, then it's hard to conclude anything. Are you storing the data on a NFS mount or similar? SQLite does not work well with that. I do not think it was anything with the update that broke it and instead suspect something with your environment.

That's copied from this project's README. I agree that part of the README should be updated. Unfortunately, I don't see any tag in this project's registry that would keep current with the latest final release. Something should be added to the build process to tag final releases with a separate tag. It should also probably tag major, and maybe even minor versions.

I don't see us changing from latest in the README since that would require we update it with every release. latest should generally be the latest tagged version but because of a misconfiguration in the Actions Workflow the RC1 release got tagged as latest as well as v1.35.0-rc1. We'll fix it so it does not happen again.

A lot of people are running auto-update tools with docker/containers and so far I have not heard of any DB corruption issues like yours with those that got it auto updated, so that's a relief.

We can keep this open for a couple more days but then I'll close it and only use as a reference, and update the docs with your recovery instructions.

from autobrr.

rpatterson avatar rpatterson commented on September 27, 2024

Alright, then it's hard to conclude anything. Are you storing the data on a NFS mount or similar?

FWIW, the original cause of the corruption may have been exhausted disk space. But this issue isn't about the cause of the corruptionm it's about autobrr choking on the recovered DB.

I don't see us changing from latest in the README since that would require we update it with every release.

Hehe, so why did you comment on my use of the latest tag in your first reply then? ;-) Oh, I see, you were just noting that latest pointed to a pre-release when it shouldn't. At any rate, depending on latest is bad practice for both maintainers and users because of it's potential surprising behavior. Best practice is to explicitly push project-controlled tags that users can count on to contain final releases, but as you like. It's certainly not an issue I'm reporting or bringing up, just responding.

from autobrr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.