Commit 3b32f5b7 authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Carlos Garnacho

Fix glitch in binary search. (tracker_db_index_flush): Break flushing when

2009-02-05  Carlos Garnacho  <carlos@imendio.com>

        * src/libtracker-db/tracker-db-index.c (indexer_update_word): Fix
        glitch in binary search.
        (tracker_db_index_flush): Break flushing when paused, so it doesn't
        try to modify the closed index.

svn path=/trunk/; revision=2880
parent 8065e522
2009-02-05 Carlos Garnacho <carlos@imendio.com>
* src/libtracker-db/tracker-db-index.c (indexer_update_word): Fix
glitch in binary search.
(tracker_db_index_flush): Break flushing when paused, so it doesn't
try to modify the closed index.
2009-02-05 Carlos Garnacho <carlos@imendio.com>
Let the indexer perform recursive move operations, so all files inside
......
......@@ -641,7 +641,7 @@ indexer_update_word (DEPOT *indez,
}
center = (right - left) / 2;
} while (left < right);
} while (left <= right);
/* Add hits that could not be updated directly here so
* they can be appended later
......@@ -850,6 +850,11 @@ tracker_db_index_flush (TrackerDBIndex *indez)
priv = TRACKER_DB_INDEX_GET_PRIVATE (indez);
if (priv->in_pause) {
g_debug ("Index was paused");
return 0;
}
if (priv->in_flush) {
g_debug ("Index was already in the middle of a flush");
return 0;
......@@ -881,6 +886,10 @@ tracker_db_index_flush (TrackerDBIndex *indez)
}
g_main_context_iteration (NULL, FALSE);
if (priv->in_pause) {
break;
}
}
g_list_free (keys);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment