[tracker-miners/wip/carlosg/ci-fixes: 44/45] libtracker-miner: Query items after commit on TrackerDecorator::finished




commit a6e1fc5f48224c2f62d68046650520a944a25218
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Oct 24 16:54:51 2020 +0200

    libtracker-miner: Query items after commit on TrackerDecorator::finished
    
    When the decorator finishes, we commit all pending tasks, and query again
    just in case there's missed ones. If we don't wait for the former to do the
    latter, we might be counting tasks that are actually completed.
    
    We will check again after commit, so just don't do this here.

 src/libtracker-miner/tracker-decorator.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-miner/tracker-decorator.c b/src/libtracker-miner/tracker-decorator.c
index 3bde1279b..5b83490d8 100644
--- a/src/libtracker-miner/tracker-decorator.c
+++ b/src/libtracker-miner/tracker-decorator.c
@@ -500,7 +500,8 @@ decorator_task_done (GObject      *object,
 
        if (priv->n_remaining_items == 0) {
                decorator_finish (decorator);
-               decorator_rebuild_cache (decorator);
+               if (priv->n_updates == 0)
+                       decorator_rebuild_cache (decorator);
        } else if (g_queue_is_empty (&priv->item_cache) &&
                   g_hash_table_size (priv->tasks) == 0 &&
                   (!priv->sparql_buffer || !priv->commit_buffer)) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]