-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
Resume library scan in event of blackout #1418
Comments
This actually affects me as well. My library is hosted in GDrive, so a full scan takes up to 4 days for me, and I constantly have to interrupt it to test out new features when I'm working on Navidrome. I already spent some time thinking about this and couldn't find a way to do it without making the scan process slower or less reliable. Will have another look.
Yes, usually when a full rescan is required, you can see in the logs something like this when starting Navidrome after upgrade:
|
Hi @deluan! Thank you very much for your reply! I was thinking, where does Navidrome store information regarding its current scan? I find it odd that everything its scanned is simply lost upon a blackout. Is the information possibly stored somewhere in RAM or When thinking about this, I came up with an idea, and I'm curious to see what you think. What if:
This method would cover the edge case of new files being added between the time of the blackout, and the reboot. The backup folder would also be very advantageous for potential database corruptions due to upgrades. I actually moved from Airsonic to Navidrome because Airsonic would corrupt my database upon every upgrade. Curious to hear what you think! Side note: Is there a way currently to temporarily disable the upgrade rescan? Or more preferably, is there a way to disable scan outright? Navidrome is working great even without a full rescan finished yet, and even my Subsonic clients have no problem with it. I'd like to save my hard drive from wear until either I can find the source of why Navidrome is tripping the watchdog, or Navidrome can restart scan from its last point. |
It does not compare each file to their counterpart in the DB. Instead, it uses a single The idea of using a cloned DB has one main drawback: While the scan is not complete the original DB would need to be set to read-only, and would not register plays/scrobbles, stars, ratings, playlist changes, etc... as any change would be lost when the scan is completed. And scan can take up to 4 days (in my case) or more!
Yes! Just set
Quick scan: Take If there is a pending upgrade scan, it will be a full scan even if you trigger quick |
That is very interesting. I'm rather confused why it doesn't just update the
Thank you, this is very useful information!
Just as a side note, I updated my raspberry pi to the most recent packages and now the watchdog tripping due to Navidrome is non-existent. Must of been an a related or non-related outdated package causing kernel issues. |
Great! Should we close this? |
The enhancement is still of value, no? For example users who are unable to keep their host up running 24/7 and shut them down daily, like in the instance of running Navidrome off of a home, work computer. |
Ok, makes sense... Just don't know how to improve this without incurring in a performance hit. Will keep it open as a reminder. |
Yeah I'd love to try and help in some way. I'd take me a while to learn the code base, being also I'm juggling other work. Thank you! |
I have an issue that I think is related to this: I had a power failure this week, which resulted in Navidrome wiping my library. My music is stored on a NAS and Navidrome on a server running 24/7 (music folder is mounted on the server via NFS). I wasn't home, but believe we lost power and the NAS shutdown based on command from my UPS. Everything restarted on its own when power came back on, but now my library is empty in Navidrome. Running a full sync brings everything back, but playlists are still blank. Any suggestion on what I should do to avoid that situation? |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Navidrome team are limited, and so we are asking for your help. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Is your feature request related to a problem? Please describe.
I recently updated Navidrome from 0.44.0 to 0.46.0. I noticed Navidrome via the output started a library rescan by noticing that old folders that have not been touched since library inception are being rescanned as a "changed folder." I assume this is due to the update, and therefore guessing what Navidrome is doing is a required scan due to the update.
I run Navidrome off of a Raspberry Pi (RPi). I found recently that RPi's have a hardware watchdog that can detect when a system is frozen, it will do a hardware reset (a reboot). I enabled it after updating Navidrome, and found Navidrome was setting off the watchdog consistently after an hour or 2.
After every reboot due to the watchdog, Navidrome restarted scanning the folders from the beginning.
Describe the solution you'd like
If Navidrome was able to resume scanning from where it was instead of restarting, that would be really great. For people like me where stability of their system is not guaranteed, this would help dramatically with large libraries.
The text was updated successfully, but these errors were encountered: