[tracker/journal] libtracker-data: Handle an unsupported ontology change
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/journal] libtracker-data: Handle an unsupported ontology change
- Date: Tue, 19 Oct 2010 12:54:10 +0000 (UTC)
commit 029ecfaec9d0fbe5126397eba4f02cd52d798a38
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Oct 19 14:53:41 2010 +0200
libtracker-data: Handle an unsupported ontology change
src/libtracker-data/tracker-data-manager.c | 47 +++++++++++++++++++++++-----
1 files changed, 39 insertions(+), 8 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 25197d1..a2ab9a1 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -3404,10 +3404,20 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
&ontology_error);
if (ontology_error) {
- g_error ("Ontology change (%s): %s",
- ontology_path,
- ontology_error->message);
+ g_debug ("\nUnsupported ontology change, replaying journal\n");
g_error_free (ontology_error);
+
+ tracker_data_manager_shutdown ();
+
+ return tracker_data_manager_init (flags,
+ test_schemas,
+ first_time,
+ journal_check,
+ select_cache_size,
+ update_cache_size,
+ busy_callback,
+ busy_user_data,
+ busy_status);
}
to_reload = g_list_prepend (to_reload, l->data);
@@ -3432,10 +3442,20 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
&ontology_error);
if (ontology_error) {
- g_error ("Ontology change (%s): %s",
- ontology_path,
- ontology_error->message);
+ g_debug ("\nUnsupported ontology change, replaying journal\n");
g_error_free (ontology_error);
+
+ tracker_data_manager_shutdown ();
+
+ return tracker_data_manager_init (flags,
+ test_schemas,
+ first_time,
+ journal_check,
+ select_cache_size,
+ update_cache_size,
+ busy_callback,
+ busy_user_data,
+ busy_status);
}
to_reload = g_list_prepend (to_reload, l->data);
@@ -3480,9 +3500,20 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
&ontology_error);
if (ontology_error) {
- g_error ("Ontology change: %s",
- ontology_error->message);
+ g_debug ("\nUnsupported ontology change, replaying journal\n");
g_error_free (ontology_error);
+
+ tracker_data_manager_shutdown ();
+
+ return tracker_data_manager_init (flags,
+ test_schemas,
+ first_time,
+ journal_check,
+ select_cache_size,
+ update_cache_size,
+ busy_callback,
+ busy_user_data,
+ busy_status);
}
for (l = to_reload; l; l = l->next) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]