Revision d1d8a6f...

Go back to digest for 28th July 2013

Bug Fixes in Multimedia

Matěj Laitl committed changes in [amarok] /:

SqlScanResultProcessor: fix stupid data-loss bug caused by my commit ca88c8d3

Commit ca88c8d3 introduced some extra logic and a member variable in
order to fix bug 311078. However, I forgot to add the variable into the
cleanupMembers() method, which resulted in state leaking from one
scanner to another.

What happened:
1. User performed full rescan. For every directory in the collection,
deleteDeletedTracksAndSubdirs() was called, which essentially
inserted all existing directory ids to m_scannedDirectoryIds.
2. All member variables were cleared except m_scannedDirectoryIds,
which leaked into the next run.
3. A file was changed, which triggered partial update scan run with
only a couple of changed directories.
4. Its deleteDeletedDirectories() method was called, which called
deletedDirectories(), which used m_scannedDirectoryIds as a basis,
removed just the newly scanned dirs from it and returned all the
rest.
5. deleteDeletedDirectories() deleted all but newly scanned
directories.
6. strohel feels ashamed.

The fix is to simply clear m_scannedDirectoryIds in cleanupMembers().

In addition to fixing bug 322603, this should also minimise changes of
reproducing bug 322474 (but not fixing the actual bug)



FIXED-IN: 2.8

File Changes

Modified 2 files
  •   ChangeLog
  •   src/core-impl/collections/db/sql/SqlScanResultProcessor.cpp
2 files changed in total