Re: [Tracker] Issue with Tracker state and removable media
- From: "Compton, Matthew" <matthew compton windriver com>
- To: "Martyn Russell" <martyn imendio com>
- Cc: tracker-list gnome org
- Subject: Re: [Tracker] Issue with Tracker state and removable media
- Date: Wed, 11 Mar 2009 15:22:33 -0700
Hello Martyn,
Sorry, I have not yet had time to test the code in TRUNK yet to see if I
still get this issue. I'm going to be busy for the next couple of weeks
but I'll try to squeeze it in.
Matt
-----Original Message-----
From: Martyn Russell [mailto:martyn imendio com]
Sent: Saturday, March 07, 2009 1:51 AM
To: Compton, Matthew
Cc: tracker-list gnome org
Subject: Re: [Tracker] Issue with Tracker state and removable media
Compton, Matthew wrote:
Hello,
Hi :)
I've found that when I configure Tracker to ONLY index removable media
(i.e. IndexMountedDirectories and IndexRemovableMedia are set to true,
no CrawlDirectory or WatchDirectoryRoots are set, and all modules
except for the files module are disabled) it will get in a strange
state on start up (or so it would seem). When trackerd is started the
function
process_module() sets TRACKER_STATUS_PENDING and, if nothing is sent
to the indexer, it will remain in this state. So when a USB drive is
plugged in and mounted it will be detected by Tracker but not indexed
because Tracker is still PENDING and not INDEXING, OPTIMIZING, or IDLE
(see the function mount_point_added_cb). Normally when trackerd is
started and it has something to index it is left in
TRACKER_STATUS_IDLE once the indexer is done so when a USB drive is
plugged in it gets indexed as expected.
I've modified the tracker_processor_stop function to check for this
case and set the tracker status to TRACKER_STATUS_IDLE. I've tested
it and it seems to work fine. Could some one please look into adding
this change to the Tracker source. If this is not the correct fix,
could someone look into this issue?
We are about to release 0.6.91 (next week) and we have fixed a bunch of
state issues since 0.6.90. Is it possible that you can test with TRUNK
to see if the problem still persists?
Here is my diff against the 0.6.90 release:
--- a/src/trackerd/tracker-processor.c
+++ b/src/trackerd/tracker-processor.c
@@ -1784,7 +1784,24 @@ tracker_processor_stop (TrackerProcessor
*processor)
processor->private->finished = TRUE;
g_signal_emit (processor, signals[FINISHED], 0);
- } else {
+
+
+ /* Added check for special case when nothing is indexed.
Function
+ * process_module() sets TRACKER_STATUS_PENDING and if there
+ is
nothing to
+ * send to the indexer we will end up here and set
TRACKER_STATUS_IDLE so
+ * when a removable drive is inserted it will be indexed.
+ */
+ /* TODO: Need more investigation, works as is, but may only
need to check
+ * directories_found == 0 &&
+ * files_found == 0
+ */
+ }else if (processor->private->directories_found == 0 &&
+ processor->private->directories_ignored == 0
&&
+ processor->private->files_found == 0 &&
+ processor->private->files_ignored == 0 &&
+ tracker_monitor_get_count
(processor->private->monitor, NULL) == 0){
+ tracker_status_set_and_signal (TRACKER_STATUS_IDLE);
+ }else {
item_queue_handlers_set_up (processor);
}
}
Thanks for the patch!
--
Regards,
Martyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]