View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014094 | MMW v4 | DB/FileMonitor | public | 2017-03-10 11:51 | 2017-03-20 19:36 |
Reporter | peke | Assigned To | |||
Priority | immediate | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 4.1.16 | Fixed in Version | 4.1.16 | ||
Summary | 0014094: Incomplete (corrupted) DB can remain if MM is killed while DB optimization | ||||
Description | On some databases upgrade fails making new DB corrupted User DB is uploaded to FTP | ||||
Additional Information | LWO-580-22958 | ||||
Tags | No tags attached. | ||||
Fixed in build | 1831 | ||||
|
I extracted the 'Backup of MM.DB prior to upgrade.zip', renamed the MM.DB.old to MM.DB and had no issue running this with 4.1.15.1830 Do you have any logs or some steps to replicate? |
|
As replied earlier on IM. The only thing I've done is that I deleted MM.DB (one from 14093) and left backup as MM.DB.old and then started MMW. After that MMW converted DB and I had same issue as user. No search results and could not browse Location Nodes. |
|
If I leave just MM.DB.old and delete MM.DB then MMW creates new empty MM.DB and thus no location nodes are presented and no search results, because there are no songs on clean DB. But If I rename MM.DB.old to MM.DB then I see no issues. User's database is loaded and seem to work fine. Looking into code the MM.DB.old and MM.DB.temp are created during the 'Optimize database (complete)' or 'Rebuild Database' process, so it seems that you (or the user) killed MMW during the Rebuild Database process or deleted original MM.DB? Because even in case of an exception the MM.DB.old is renamed back to MM.DB, the only uncovered cases seems to be hard kill of MM or hard delete of MM.DB. I guess that that MM should be able to recover and use the MM.DB.old on the next start. |
|
Looking into the MM.DB uploaded to #14093 : it is really an incomplete MM.DB (only 100 MB against 350 MB MM.DB.old), Folders table is empty and SongsText table is missing. So it really looks like if the user killed database optimization process in the middle and thus get into this incomplete DB state. The solution is to replace MM.DB by MM.DB.old on next MMW start (as mentioned above). |
|
Peke, why this issue is called "Upgrade: Upgrade fail on some databases" ?? From LWO-580-22958 I see that user reported this problem two months ago (with 4.1.13) and said: "For some reason I can no longer perform a search in my music library. When I try, a pop up box says there was a problem querying the database. Error executing SQL select songs." => so it seems that even two months ago he already had an incomplete database (probably caused by the interrupted DB optimize process), because MM.DB.old was there? I renamed the issue to "Incomplete (corrupted ) DB can remain if MM is killed while DB optimization" |
|
I can replicate the DB corruption if I force kill MMW while "Optimize database (complete)" is running. I guess that rather then creating MM.DB.old and re-writing MM.DB the approach should be changed. MM should rather create 'MM.DB.new' and keep 'MM.DB' untouched until the whole process is successfully completed. |
|
Fixed in 4.1.16.1831 |
|
Verified 1831 |