[tracker/tracker-0.10] tracker-miner-fs: Do not insert minimal sparql on cancellation
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] tracker-miner-fs: Do not insert minimal sparql on cancellation
- Date: Thu, 9 Jun 2011 12:38:49 +0000 (UTC)
commit fb8b4d1165d63d9a45978550822f92ed2dfbb3ba
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Jun 9 14:30:07 2011 +0200
tracker-miner-fs: Do not insert minimal sparql on cancellation
Cancellation only happens on unmount, the file is gone anyway and
would be reindexed the next time it is available, so don't do
potentially long operations here such as flushing the sparql buffer.
Together with my previous commit (3cdb6ba91), these commits are meant
to have Tracker react even faster to unmount events, finally fixing
NB#258488, hopefully.
src/libtracker-miner/tracker-miner-fs.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 7941fc0..b0f19aa 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1683,9 +1683,16 @@ item_add_or_update_cb (TrackerMinerFS *fs,
} else {
fs->priv->total_files_notified_error++;
- g_message ("Could not process '%s': %s",
- uri,
- error->message ? error->message : "No error given");
+ g_message ("Could not process '%s': %s", uri, error->message);
+
+ if (error->code == G_IO_ERROR_CANCELLED) {
+ /* Cancelled is cancelled, just move along in this case */
+ tracker_processing_pool_remove_task (fs->private->processing_pool, task);
+ tracker_processing_task_free (task);
+
+ item_queue_handlers_set_up (fs);
+ return;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]