GNOME Bugzilla – Bug 758341
libtracker-miner deletes things it didn't insert
Last modified: 2015-11-23 14:00:24 UTC
I'm trying to implement a new MinerFiles based on TrackerMinerFS. when my miner is called to process a file, I must call tracker_miner_fs_file_notify() API in order to inform that I finished processing it. At this moment, TrackerMinerFS will delete datas in the store while it did not insert them. This is due to an ambiguity between TrackerMinerFS provided by libtracker-miner and TrackerMinerFiles which is a MinerFiles implementing TrackerMinerFS. the delete query should be moved to TrackerMinerFiles as it's the owner of the datas.
Created attachment 315964 [details] [review] miner-fs: Shift the deletion of previous properties from libtracker-miner Performing the deletion inside libtracker-miner takes some assumptions we shouldn't be doing in a generic library, such as the graph we're deleting from. It makes more sense to make miners responsible of deleting their older properties prior to a file update.
Review of attachment 315964 [details] [review]: other Miners should be updated too (applications/user-guides, ...) , not only the FS Miner.
Created attachment 316017 [details] [review] miners: Take over the deletion of previous properties from TrackerMinerFS Performing the deletion inside libtracker-miner takes some assumptions we shouldn't be doing in a generic library, such as the graph we're deleting from. It makes more sense to make miners responsible of deleting their older properties prior to a file update. Applications/user guides miners could be more specific as to which properties they're deleting, we'll rely on those not stepping over other miners' toes at the moment.
Comment on attachment 315964 [details] [review] miner-fs: Shift the deletion of previous properties from libtracker-miner Cheers for the review, I indeed missed those, addressed in the new patch. I'll be pushing this to master along the weekend.
Attachment 316017 [details] pushed as ee3f070 - miners: Take over the deletion of previous properties from TrackerMinerFS