[tracker-miners/tracker-miners-3.0: 2/4] libtracker-miner: Query items after commit on TrackerDecorator::finished




commit 8b8e8fcdd60d43cc8241aae329a9a4bd314e9449
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]