Skip to content

libtracker-data: Mark specific properties as being deleted

When dealing with single-valued properties that are deleted, we rely on the batch being explicitly flushed so that property deletions and insertions are not mixed up. We don't need to do this, instead we can tag individual properties as being deleted, so that we can mix deletions and insertions in the same row update.

We were failing to do this explicit flushing at places in update_resource() which was leading to some triples being ignored (deemed as being deleted too, despite them being actually on their way to insertion).

The tip of the iceberg here was a FTS property, as this circumstance left the real table column content and the fts5 contentless tokenization data for that corresponding column out of sync. This resulted in FTS corrupted index on tracker-miner-fs-3 after:

 $ touch ~/lalala
 $ rm ~/lalala
 $ tracker3 search lalala

Making property deletion a per-property thing, we can avoid the explicit flush, write correctly the missing properties (nfo:fileName in the tracker:FileSystem graph, in this case), and make the column content match the FTS tokens again.

Fixes: #308 (closed)

Merge request reports