[tracker/error-handling: 6/6] libtracker-data: Rollback transaction on (disk-space) failure in journal replayer
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/error-handling: 6/6] libtracker-data: Rollback transaction on (disk-space) failure in journal replayer
- Date: Wed, 9 Feb 2011 11:08:54 +0000 (UTC)
commit 5a46ba099b69194bf0dbcb1fac0e4afa61752598
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Feb 8 18:20:09 2011 +0100
libtracker-data: Rollback transaction on (disk-space) failure in journal replayer
src/libtracker-data/tracker-data-update.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 2446fc9..4f0a814 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -2577,8 +2577,8 @@ tracker_data_notify_transaction (gboolean start_timer)
}
}
-void
-tracker_data_rollback_transaction (void)
+static void
+tracker_data_rollback_journal_transaction (void)
{
TrackerDBInterface *iface;
@@ -2596,6 +2596,12 @@ tracker_data_rollback_transaction (void)
}
tracker_db_interface_execute_query (iface, NULL, "PRAGMA cache_size = %d", TRACKER_DB_CACHE_SIZE_DEFAULT);
+}
+
+void
+tracker_data_rollback_transaction (void)
+{
+ tracker_data_rollback_journal_transaction ();
tracker_db_journal_rollback_transaction ();
if (rollback_callbacks) {
@@ -2731,6 +2737,7 @@ tracker_data_replay_journal (TrackerBusyCallback busy_callback,
tracker_data_commit_transaction (&new_error);
if (new_error) {
+ tracker_data_rollback_journal_transaction ();
g_warning ("Journal replay error: '%s'", new_error->message);
g_clear_error (&new_error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]