stale data display race condition during track cache expiration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mixxx |
Fix Released
|
Low
|
RJ Skerry-Ryan |
Bug Description
In some circumstances the library can show stale data for a track in the time between a TrackPointer expiring and being saved to the database. Here's the rough series of steps that leads to this:
BaseTrackCache contains stale data, TrackPointer has modified data
1) Track N+cacheSize Loaded
2) TrackDAO QCache expires TrackPointer N -- TrackPointer reference count drops to zero
3) TrackPointer destructor called -- calls QObject:
From this point on we are serving stale results for the track out of BaseTrackCache since TrackDAO will not serve Track N out of the cache (the TrackPointer has already been deleted and it is pending a database write). TrackDAO's weak reference cache (m_sTracks) will not convert to a TrackPointer since its strong reference is gone.
4) At some point, a library update re-draws the cell for the row for track N. RENDERING STALE DATA
5) QObject:
6) TrackDAO saves the track, sets the track clean.
7) TrackN signals clean, BaseTrackCache runs updateIndexForT
8) BaseTrackCache trackChanged signal hits BaseSqlTableModel, which emits row-redraw calls for affected rows
9) Library table redraws affected cells, drawing up to date data
Changed in mixxx: | |
milestone: | none → 1.12.0 |
assignee: | nobody → RJ Ryan (rryan) |
importance: | Undecided → Low |
status: | New → In Progress |
tags: | added: library |
summary: |
- stale data display race condition in track cache expiration + stale data display race condition during track cache expiration |
Changed in mixxx: | |
status: | Fix Committed → Fix Released |
did we fix this?