[tracker/urho-sync] Added transaction barriers to the journal player
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/urho-sync] Added transaction barriers to the journal player
- Date: Mon, 24 Aug 2009 10:03:46 +0000 (UTC)
commit 3de8d7d0a2447840bd4c4168a9993fc78d504ad3
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Aug 24 12:02:58 2009 +0200
Added transaction barriers to the journal player
src/tracker-store/tracker-store.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-store/tracker-store.c b/src/tracker-store/tracker-store.c
index 00cc05f..e60be83 100644
--- a/src/tracker-store/tracker-store.c
+++ b/src/tracker-store/tracker-store.c
@@ -316,7 +316,7 @@ tracker_store_flush_journal (void)
}
static void
-interal_play_journal (TrackerStorePrivate *private)
+internal_play_journal (TrackerStorePrivate *private)
{
TrackerJournalContents *lines;
@@ -324,6 +324,8 @@ interal_play_journal (TrackerStorePrivate *private)
if (lines) {
guint i;
+
+ tracker_data_begin_transaction ();
private->start_log = FALSE;
for (i = 0; i < lines->len; i++) {
const gchar *line = g_ptr_array_index (lines, i);
@@ -331,6 +333,7 @@ interal_play_journal (TrackerStorePrivate *private)
}
tracker_db_journal_truncate ();
private->start_log = TRUE;
+ tracker_data_commit_transaction ();
tracker_db_journal_free_contents (lines);
}
@@ -344,7 +347,7 @@ tracker_store_play_journal (void)
private = g_static_private_get (&private_key);
g_return_if_fail (private != NULL);
- interal_play_journal (private);
+ internal_play_journal (private);
}
void
@@ -362,7 +365,7 @@ tracker_store_init (gboolean load_journal)
private_free);
if (load_journal) {
- interal_play_journal (private);
+ internal_play_journal (private);
}
tracker_db_journal_open ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]