tracker r2208 - in branches/indexer-split: . src/libtracker-db src/tracker-indexer
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2208 - in branches/indexer-split: . src/libtracker-db src/tracker-indexer
- Date: Tue, 9 Sep 2008 13:15:07 +0000 (UTC)
Author: mr
Date: Tue Sep 9 13:15:07 2008
New Revision: 2208
URL: http://svn.gnome.org/viewvc/tracker?rev=2208&view=rev
Log:
* src/libtracker-db/tracker-db-index.c: Cleaned up the code.
* src/tracker-indexer/tracker-indexer.c: When finishing do 2
things. First make sure we flush BEFORE we unset the flag to say
we are indexing. This way the flush function doesn't just return.
Also when finished, we now close the index. This means that the
daemon can use the new index when it reopens it after indexing.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/libtracker-db/tracker-db-index.c
branches/indexer-split/src/tracker-indexer/tracker-indexer.c
Modified: branches/indexer-split/src/libtracker-db/tracker-db-index.c
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-index.c (original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-index.c Tue Sep 9 13:15:07 2008
@@ -738,7 +738,6 @@
g_return_val_if_fail (priv->filename != NULL, FALSE);
g_return_val_if_fail (priv->index == NULL, FALSE);
-
g_debug ("Opening index:'%s' (%s)",
priv->filename,
priv->readonly ? "readonly" : "read/write");
@@ -790,7 +789,6 @@
priv->reload = TRUE;
}
-
return !priv->reload;
}
@@ -804,7 +802,6 @@
priv = TRACKER_DB_INDEX_GET_PRIVATE (index);
-
retval = TRUE;
if (priv->index) {
@@ -819,12 +816,12 @@
priv->index = NULL;
}
-
return retval;
}
void
-tracker_db_index_set_paused (TrackerDBIndex *index, gboolean paused)
+tracker_db_index_set_paused (TrackerDBIndex *index,
+ gboolean paused)
{
TrackerDBIndexPrivate *priv;
@@ -839,8 +836,6 @@
}
}
-
-
guint
tracker_db_index_flush (TrackerDBIndex *index)
{
Modified: branches/indexer-split/src/tracker-indexer/tracker-indexer.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/tracker-indexer.c (original)
+++ branches/indexer-split/src/tracker-indexer/tracker-indexer.c Tue Sep 9 13:15:07 2008
@@ -621,11 +621,15 @@
g_timer_stop (indexer->private->timer);
seconds_elapsed = g_timer_elapsed (indexer->private->timer, NULL);
- state_set_flags (indexer, TRACKER_INDEXER_STATE_STOPPED);
-
/* Flush remaining items */
schedule_flush (indexer, TRUE);
+ /* Close indexes */
+ tracker_db_index_close (indexer->private->file_index);
+ tracker_db_index_close (indexer->private->email_index);
+
+ state_set_flags (indexer, TRACKER_INDEXER_STATE_STOPPED);
+
/* Print out how long it took us */
str = tracker_seconds_to_string (seconds_elapsed, FALSE);
@@ -724,7 +728,7 @@
static gboolean
signal_status_cb (TrackerIndexer *indexer)
{
- signal_status (indexer, "");
+ signal_status (indexer, "status update");
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]