[tracker/tracker-0.14] libtracker-miner: Avoid stalling when blocking file is dropped due to errors
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.14] libtracker-miner: Avoid stalling when blocking file is dropped due to errors
- Date: Thu, 5 Jul 2012 16:26:29 +0000 (UTC)
commit 65b227f7f4c851e04f3eb71a275d61741ffde0cb
Author: Sam Thursfield <sam thursfield codethink co uk>
Date: Wed Jun 27 17:54:17 2012 +0100
libtracker-miner: Avoid stalling when blocking file is dropped due to errors
src/libtracker-miner/tracker-miner-fs.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index ed2c970..8c0fd43 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1242,6 +1242,16 @@ item_add_or_update_cb (TrackerMinerFS *fs,
if (item_queue_is_blocked_by_file (fs, task_file)) {
tracker_sparql_buffer_flush (fs->priv->sparql_buffer, "Current file is blocking item queue");
}
+ } else {
+ if (item_queue_is_blocked_by_file (fs, task_file)) {
+ /* Make sure that we don't stall the item queue, although we could
+ * expect the file to be reenqueued until the loop detector makes
+ * us drop it since we were specifically waiting for it to complete.
+ */
+ g_object_unref (fs->priv->item_queue_blocker);
+ fs->priv->item_queue_blocker = NULL;
+ item_queue_handlers_set_up (fs);
+ }
}
if (tracker_miner_fs_has_items_to_process (fs) == FALSE &&
@@ -3371,6 +3381,13 @@ tracker_miner_fs_file_notify (TrackerMinerFS *fs,
G_OBJECT_TYPE_NAME (fs), uri);
g_free (uri);
+ if (item_queue_is_blocked_by_file (fs, file)) {
+ /* Ensure we don't stall, although this is a very ugly situation */
+ g_object_unref (fs->priv->item_queue_blocker);
+ fs->priv->item_queue_blocker = NULL;
+ item_queue_handlers_set_up (fs);
+ }
+
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]