[tracker-miners/wip/carlosg/ci-fixes: 2/2] libtracker-miner: Query items after commit on TrackerDecorator::finished
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/ci-fixes: 2/2] libtracker-miner: Query items after commit on TrackerDecorator::finished
- Date: Sat, 24 Oct 2020 17:38:42 +0000 (UTC)
commit 86460c4dc6d07bdccf8c92db737905a9a90eed47
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]