dirty tracks rarely saved

Bug #700799 reported by Owen Williams
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
RJ Skerry-Ryan
1.10
Fix Released
Medium
RJ Skerry-Ryan
1.9
Fix Released
Medium
RJ Skerry-Ryan

Bug Description

Currently mixxx relies on a QCache expiration to update the database, but in practice the database is really only updated on exit (when saveDirtyTracks is explicitly called). This means that my crash-helper code doesn't work.

every time a track is played, I toggle the "played" flag. On exit, all those flags are cleared. The idea being that if mixxx crashes, next time it is started the played tracks will already be checked off. Since the database is never updated on my machine except on exit, after a crash I don't have any of the changes that were made to the db.

I'd recommend a 5 minute timer in trackdao that calls saveDirtyTracks, perhaps not making the call if there are analyzer queues or other heavy operations in progress.

Related branches

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Another tricky library issue.

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I'm thinking of either doing away with the track cache or making it much smaller (~5 tracks). This will prevent the pathological case of the BaseSqlTableModel querying-and-requerying a track 100 times, but tracks will get saved a lot faster as people use Mixxx.

Changed in mixxx:
assignee: nobody → RJ Ryan (rryan)
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Ok, in the 1.9.x branch, the track cache is now 5. The track cache came along a long time ago when we were debugging xrun-on-track-load issues. It was mostly to prevent tracks from generating SQL queries at load time. This approach is kind of useless now because tracks become dirty the second they are loaded. I'd be in favor of removing the track cache totally.

RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Confirmed → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5749

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.