[tracker-miners/wip/carlosg/perf-squeeze: 1/16] tracker-miner-fs: Drop special case for update vs create
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/perf-squeeze: 1/16] tracker-miner-fs: Drop special case for update vs create
- Date: Sun, 5 Jul 2020 14:02:26 +0000 (UTC)
commit 9c142796d9816080f20802f279684d5a3de4b552
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jul 4 13:03:33 2020 +0200
tracker-miner-fs: Drop special case for update vs create
We query the URN here as a mean to check that a file was already
added, and do things that should essentially turn into no-ops in
the case of a create event (as the resource would exist previously).
Drop the URN check here, makes create/update events handled all the
same, and avoids having to query information elements for things
that are not folders.
Besides, this fixes a funky side effect of our event coalescing wrt
writeback: We write the file in a temporary hidden file and then
move onto the original location. Sometimes we get to coalesce
CREATE(A)+MOVE(A,B) as CREATE(B) right away, without checking that
B exists. This skips the the extractorHash property deletion, so
tracker-extract doesn't get to re-extract the file. If we handle
creates and updates the same way, this is moot.
src/miners/fs/tracker-miner-files.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 1cefeae6b..a1139bdea 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2136,9 +2136,8 @@ process_file_cb (GObject *object,
is_directory = (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY ?
TRUE : FALSE);
- if (!is_directory &&
- tracker_miner_fs_get_urn (TRACKER_MINER_FS (data->miner), file)) {
- /* Update: delete all information elements for the given data object
+ if (!is_directory) {
+ /* In case of update: delete all information elements for the given data object
* and delete extractorHash, so we ensure the file is extracted again.
*/
delete_properties_sparql =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]