After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758341 - libtracker-miner deletes things it didn't insert
libtracker-miner deletes things it didn't insert
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Miners
unspecified
Other Linux
: Normal major
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2015-11-19 14:07 UTC by Haithem BEN GHORBAL
Modified: 2015-11-23 14:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
miner-fs: Shift the deletion of previous properties from libtracker-miner (5.29 KB, patch)
2015-11-20 12:19 UTC, Carlos Garnacho
none Details | Review
miners: Take over the deletion of previous properties from TrackerMinerFS (8.50 KB, patch)
2015-11-21 12:49 UTC, Carlos Garnacho
committed Details | Review

Description Haithem BEN GHORBAL 2015-11-19 14:07:29 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.
Comment 1 Carlos Garnacho 2015-11-20 12:19:57 UTC
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.
Comment 2 Haithem BEN GHORBAL 2015-11-20 14:20:01 UTC
Review of attachment 315964 [details] [review]:

other Miners should be updated too (applications/user-guides, ...) , not only the FS Miner.
Comment 3 Carlos Garnacho 2015-11-21 12:49:15 UTC
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 4 Carlos Garnacho 2015-11-21 12:52:01 UTC
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.
Comment 5 Carlos Garnacho 2015-11-23 14:00:18 UTC
Attachment 316017 [details] pushed as ee3f070 - miners: Take over the deletion of previous properties from TrackerMinerFS