Dirty tracks cause incorrect sorting and searching

Bug #700802 reported by Owen Williams
30
This bug affects 4 people
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

If I make changes to track metadata (retitling, or changing the comment, etc), subsequent searches of the library don't reflect the new values. This is because the search function only uses the database, not the dirty track data.

The fix for this bug is either:
* rewrite the search function to look through the dirty tracks (hard coding but fast execution)
* save dirty tracks before performing the search (easy coding but whacks the DB)

Related branches

RJ Skerry-Ryan (rryan)
summary: - database searches don't reflect dirty track updates
+ Dirty tracks cause incorrect sorting and searching
Changed in mixxx:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Fixing searching and sorting to defer to the track cache is pretty hard given the way things work now sadly. Correctness has a pretty big cost in this case. Every single track gets dirtied now on load b/c it is marked played, so on a sort or search we have to save ~50 tracks if the cache is full.

Revision history for this message
Owen Williams (ywwg) wrote :

In my own tree I created a timer to automatically save dirty tracks every 5 minutes, and also save dirty tracks when each search is performed. I haven't noticed any performance problems as a result, but I'm on a fairly modern system.

Is the alternative to add code to perform searches within the dirty tracks? I guess that's a pain, although not undoable.

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

When you save the dirty tracks though, the information in the library table becomes stale right?

Revision history for this message
Owen Williams (ywwg) wrote :

What do you mean by stale? Like, the library table is out of date vs the database? I haven't noticed the table ever being out of date. Like, say, when I load in a new track, the bpm and comment field still auto-fill, so that seems to work.

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

Example :

1) Play songs, their played checkbox is checked.
2) Track save timer fires
3) Now that the tracks are no longer in the track cache, their checkboxes disappear.
4) Hit a column header to sort, the track details are back up to date.

B/c the table caches the entire query result set, once a track goes out of the track cache, the old, stale query cache is used, which results in the data for the track showing in the table being stale.

Changed in mixxx:
assignee: nobody → RJ Ryan (rryan)
Revision history for this message
Owen Williams (ywwg) wrote :

You're right I think I've seen this happen.

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

Pushed a fix to 1.9.x. Changes should be in trunk soon.

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/5750

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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