[tracker/journal: 5/18] libtracker-data: Fix ontology transaction handling
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/journal: 5/18] libtracker-data: Fix ontology transaction handling
- Date: Wed, 13 Oct 2010 13:09:49 +0000 (UTC)
commit aa1bdd9838f96fea1eb2cce669f70da6b7732660
Author: Jürg Billeter <j bitron ch>
Date: Wed Sep 29 13:59:08 2010 +0200
libtracker-data: Fix ontology transaction handling
src/libtracker-data/tracker-data-manager.c | 6 ------
src/libtracker-data/tracker-data-update.c | 8 ++++++--
2 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index ca0ed70..92f087f 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -2979,12 +2979,6 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
tracker_data_begin_ontology_transaction (NULL);
- /* This _is_ an ontology transaction, it represents a change to the
- * ontology. We mark it up as such in the journal, so that replay_journal
- * can recognize it and deal with it properly. */
-
- tracker_db_journal_start_ontology_transaction (time (NULL));
-
/* Get a map of tracker:Ontology v. nao:lastModified so that we can test
* for all the ontology files in ontologies_dir whether the last-modified
* has changed since we dealt with the file last time. */
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 8a6e88e..cea2baf 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -2255,7 +2255,11 @@ tracker_data_begin_transaction (GError **error)
tracker_db_interface_start_transaction (iface);
if (!in_journal_replay) {
- tracker_db_journal_start_transaction (resource_time);
+ if (in_ontology_transaction) {
+ tracker_db_journal_start_ontology_transaction (resource_time);
+ } else {
+ tracker_db_journal_start_transaction (resource_time);
+ }
}
iface = tracker_db_manager_get_db_interface ();
@@ -2266,8 +2270,8 @@ tracker_data_begin_transaction (GError **error)
void
tracker_data_begin_ontology_transaction (GError **error)
{
- tracker_data_begin_transaction (error);
in_ontology_transaction = TRUE;
+ tracker_data_begin_transaction (error);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]