[tracker/unsupported-ontology-change: 2/4] libtracker-data: Rollback transaction on unsupported ontology change
- From: JÃrg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/unsupported-ontology-change: 2/4] libtracker-data: Rollback transaction on unsupported ontology change
- Date: Mon, 12 Sep 2011 15:34:38 +0000 (UTC)
commit fb432e44ef3b07e681a150be357f636de804816c
Author: JÃrg Billeter <j bitron ch>
Date: Mon Sep 12 17:01:41 2011 +0200
libtracker-data: Rollback transaction on unsupported ontology change
This does not make a difference when replaying journal, however, if
the journal is disabled, we want to continue using the old ontology
if we cannot use the new version.
src/libtracker-data/tracker-data-manager.c | 51 ++--------------------------
1 files changed, 3 insertions(+), 48 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index eecf56c..651458a 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -4031,22 +4031,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
/* as we're processing an ontology change,
transaction is guaranteed to be started */
- tracker_data_commit_transaction (&internal_error);
- if (internal_error) {
- g_propagate_error (error, internal_error);
-
-#ifndef DISABLE_JOURNAL
- tracker_db_journal_shutdown (NULL);
-#endif /* DISABLE_JOURNAL */
- tracker_db_manager_shutdown ();
- tracker_ontologies_shutdown ();
- if (!reloading) {
- tracker_locale_shutdown ();
- }
- tracker_data_update_shutdown ();
-
- return FALSE;
- }
+ tracker_data_rollback_transaction ();
if (ontos_table) {
g_hash_table_unref (ontos_table);
@@ -4136,22 +4121,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
/* as we're processing an ontology change,
transaction is guaranteed to be started */
- tracker_data_commit_transaction (&internal_error);
- if (internal_error) {
- g_propagate_error (error, internal_error);
-
-#ifndef DISABLE_JOURNAL
- tracker_db_journal_shutdown (NULL);
-#endif /* DISABLE_JOURNAL */
- tracker_db_manager_shutdown ();
- tracker_ontologies_shutdown ();
- if (!reloading) {
- tracker_locale_shutdown ();
- }
- tracker_data_update_shutdown ();
-
- return FALSE;
- }
+ tracker_data_rollback_transaction ();
if (ontos_table) {
g_hash_table_unref (ontos_table);
@@ -4247,22 +4217,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
/* as we're processing an ontology change,
transaction is guaranteed to be started */
- tracker_data_commit_transaction (&internal_error);
- if (internal_error) {
- g_propagate_error (error, internal_error);
-
-#ifndef DISABLE_JOURNAL
- tracker_db_journal_shutdown (NULL);
-#endif /* DISABLE_JOURNAL */
- tracker_db_manager_shutdown ();
- tracker_ontologies_shutdown ();
- if (!reloading) {
- tracker_locale_shutdown ();
- }
- tracker_data_update_shutdown ();
-
- return FALSE;
- }
+ tracker_data_rollback_transaction ();
if (ontos_table) {
g_hash_table_unref (ontos_table);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]