[tracker] libtracker-data: Disable journal with --disable-journal
- From: JÃrg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Disable journal with --disable-journal
- Date: Wed, 29 Jun 2011 15:35:55 +0000 (UTC)
commit c23cd4bced1ee493fb6f0b15741c594befe741db
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Jun 23 14:36:54 2011 +0200
libtracker-data: Disable journal with --disable-journal
Fixes NB#268105.
src/libtracker-data/tracker-data-manager.c | 43 +++++++++++++++++++++
src/libtracker-data/tracker-data-update.c | 51 +++++++++++++++++++++++--
src/libtracker-data/tracker-db-journal.c | 17 ++++++++-
src/libtracker-data/tracker-db-manager.c | 23 ++++++++++-
src/tracker-control/tracker-control-general.c | 14 +++++-
5 files changed, 137 insertions(+), 11 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index da4b0bd..e1d3642 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -1747,6 +1747,7 @@ get_ontology_from_path (const gchar *ontology_path)
return ret;
}
+#ifndef DISABLE_JOURNAL
static void
load_ontology_ids_from_journal (GHashTable **uri_id_map_out,
gint *max_id)
@@ -1774,6 +1775,7 @@ load_ontology_ids_from_journal (GHashTable **uri_id_map_out,
*uri_id_map_out = uri_id_map;
}
+#endif /* DISABLE_JOURNAL */
static void
tracker_data_ontology_process_statement (const gchar *graph,
@@ -2394,9 +2396,11 @@ insert_uri_in_resource_table (TrackerDBInterface *iface,
return;
}
+#ifndef DISABLE_JOURNAL
if (!in_journal_replay) {
tracker_db_journal_append_resource (id, uri);
}
+#endif /* DISABLE_JOURNAL */
g_object_unref (stmt);
@@ -3542,6 +3546,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
iface = tracker_db_manager_get_db_interface ();
+#ifndef DISABLE_JOURNAL
if (journal_check && is_first_time_index) {
/* Call may fail without notice (it's handled) */
if (tracker_db_journal_reader_init (NULL, &internal_error)) {
@@ -3570,6 +3575,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
}
}
}
+#endif /* DISABLE_JOURNAL */
env_path = g_getenv ("TRACKER_DB_ONTOLOGIES_DIR");
@@ -3582,6 +3588,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
ontologies_dir = g_strdup (env_path);
}
+#ifndef DISABLE_JOURNAL
if (read_journal) {
in_journal_replay = TRUE;
@@ -3617,10 +3624,12 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
read_journal = FALSE;
}
}
+#endif /* DISABLE_JOURNAL */
if (is_first_time_index && !read_only) {
sorted = get_ontologies (test_schemas != NULL, ontologies_dir);
+#ifndef DISABLE_JOURNAL
if (!read_journal) {
/* Truncate journal as it does not even contain a single valid transaction
* or is explicitly ignored (journal_check == FALSE, only for test cases) */
@@ -3639,6 +3648,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
return FALSE;
}
}
+#endif /* DISABLE_JOURNAL */
/* load ontology from files into memory (max_id starts at zero: first-time) */
@@ -3692,7 +3702,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
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) {
@@ -3712,7 +3724,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
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) {
@@ -3737,7 +3751,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
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) {
@@ -3772,7 +3788,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
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) {
@@ -3793,6 +3811,8 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
check_ontology = FALSE;
} else {
if (!read_only) {
+
+#ifndef DISABLE_JOURNAL
tracker_db_journal_init (NULL, FALSE, &internal_error);
if (internal_error) {
@@ -3807,6 +3827,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
return FALSE;
}
+#endif /* DISABLE_JOURNAL */
/* Load ontology from database into memory */
db_get_static_data (iface, &internal_error);
@@ -3954,7 +3975,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
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) {
@@ -3995,7 +4018,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
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) {
@@ -4053,7 +4078,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
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) {
@@ -4094,7 +4121,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
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) {
@@ -4201,7 +4230,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
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) {
@@ -4245,7 +4276,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
g_critical ("Fatal error dealing with ontology changes: %s", ontology_error->message);
g_propagate_error (error, ontology_error);
+#ifndef DISABLE_JOURNAL
tracker_db_journal_shutdown (NULL);
+#endif /* DISABLE_JOURNAL */
tracker_db_manager_shutdown ();
tracker_ontologies_shutdown ();
if (!reloading) {
@@ -4279,7 +4312,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
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) {
@@ -4297,6 +4332,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
g_list_free (ontos);
}
+#ifndef DISABLE_JOURNAL
if (read_journal) {
/* Report OPERATION - STATUS */
busy_status = g_strdup_printf ("%s - %s",
@@ -4361,6 +4397,7 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
g_hash_table_unref (uri_id_map);
}
+#endif /* DISABLE_JOURNAL */
/* If locale changed, re-create indexes */
if (!read_only && tracker_db_manager_locale_changed ()) {
@@ -4380,7 +4417,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
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) {
@@ -4413,10 +4452,13 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
void
tracker_data_manager_shutdown (void)
{
+#ifndef DISABLE_JOURNAL
GError *error = NULL;
+#endif /* DISABLE_JOURNAL */
g_return_if_fail (initialized == TRUE);
+#ifndef DISABLE_JOURNAL
/* Make sure we shutdown all other modules we depend on */
tracker_db_journal_shutdown (&error);
@@ -4426,6 +4468,7 @@ tracker_data_manager_shutdown (void)
error->message ? error->message : "No error given");
g_error_free (error);
}
+#endif /* DISABLE_JOURNAL */
tracker_db_manager_shutdown ();
tracker_ontologies_shutdown ();
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 4aba5dc..73f8ce5 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -657,9 +657,11 @@ ensure_resource_id (const gchar *uri,
g_error_free (error);
}
+#ifndef DISABLE_JOURNAL
if (!in_journal_replay) {
tracker_db_journal_append_resource (id, uri);
}
+#endif /* DISABLE_JOURNAL */
g_hash_table_insert (update_buffer.resource_cache, g_strdup (uri), GINT_TO_POINTER (id));
}
@@ -2140,6 +2142,7 @@ tracker_data_delete_statement (const gchar *graph,
if (class != NULL) {
has_persistent = TRUE;
+#ifndef DISABLE_JOURNAL
if (!in_journal_replay) {
tracker_db_journal_append_delete_statement_id (
(graph != NULL ? query_resource_id (graph) : 0),
@@ -2147,6 +2150,8 @@ tracker_data_delete_statement (const gchar *graph,
tracker_data_query_resource_id (predicate),
tracker_class_get_id (class));
}
+#endif /* DISABLE_JOURNAL */
+
cache_delete_resource_type (class, graph, 0);
} else {
g_set_error (error, TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNKNOWN_CLASS,
@@ -2167,37 +2172,42 @@ tracker_data_delete_statement (const gchar *graph,
if (!in_journal_replay && change && !tracker_property_get_transient (field)) {
if (tracker_property_get_data_type (field) == TRACKER_PROPERTY_TYPE_RESOURCE) {
- pred_id = tracker_property_get_id (field);
graph_id = (graph != NULL ? query_resource_id (graph) : 0);
+ pred_id = tracker_property_get_id (field);
object_id = query_resource_id (object);
tried = TRUE;
+#ifndef DISABLE_JOURNAL
tracker_db_journal_append_delete_statement_id (graph_id,
resource_buffer->id,
pred_id,
object_id);
+#endif /* DISABLE_JOURNAL */
} else {
pred_id = tracker_property_get_id (field);
graph_id = (graph != NULL ? query_resource_id (graph) : 0);
object_id = 0;
tried = TRUE;
+#ifndef DISABLE_JOURNAL
if (!tracker_property_get_force_journal (field) &&
g_strcmp0 (graph, TRACKER_MINER_FS_GRAPH_URN) == 0) {
/* do not journal this statement extracted from filesystem */
TrackerProperty *damaged;
damaged = tracker_ontologies_get_property_by_uri (TRACKER_TRACKER_PREFIX "damaged");
+
tracker_db_journal_append_insert_statement (graph_id,
- resource_buffer->id,
- tracker_property_get_id (damaged),
- "true");
+ resource_buffer->id,
+ tracker_property_get_id (damaged),
+ "true");
} else {
tracker_db_journal_append_delete_statement (graph_id,
resource_buffer->id,
pred_id,
object);
}
+#endif /* DISABLE_JOURNAL */
}
}
} else {
@@ -2459,6 +2469,7 @@ tracker_data_insert_statement_with_uri (const gchar *graph,
}
}
+#ifndef DISABLE_JOURNAL
if (!in_journal_replay && change && !tracker_property_get_transient (property)) {
tracker_db_journal_append_insert_statement_id (
(graph != NULL ? query_resource_id (graph) : 0),
@@ -2466,6 +2477,8 @@ tracker_data_insert_statement_with_uri (const gchar *graph,
final_prop_id,
object_id);
}
+#endif /* DISABLE_JOURNAL */
+
}
void
@@ -2538,6 +2551,7 @@ tracker_data_insert_statement_with_string (const gchar *graph,
}
}
+#ifndef DISABLE_JOURNAL
if (!in_journal_replay && change && !tracker_property_get_transient (property)) {
if (!tried) {
graph_id = (graph != NULL ? query_resource_id (graph) : 0);
@@ -2560,6 +2574,7 @@ tracker_data_insert_statement_with_string (const gchar *graph,
object);
}
}
+#endif /* DISABLE_JOURNAL */
}
static void
@@ -2752,6 +2767,7 @@ tracker_data_update_statement_with_uri (const gchar *graph,
}
}
+#ifndef DISABLE_JOURNAL
if (!in_journal_replay && change && !tracker_property_get_transient (property)) {
tracker_db_journal_append_update_statement_id (
(graph != NULL ? query_resource_id (graph) : 0),
@@ -2759,6 +2775,7 @@ tracker_data_update_statement_with_uri (const gchar *graph,
final_prop_id,
object_id);
}
+#endif /* DISABLE_JOURNAL */
}
static void
@@ -2873,6 +2890,7 @@ tracker_data_update_statement_with_string (const gchar *graph,
}
}
+#ifndef DISABLE_JOURNAL
if (!in_journal_replay && change && !tracker_property_get_transient (property)) {
if (!tried) {
graph_id = (graph != NULL ? query_resource_id (graph) : 0);
@@ -2895,6 +2913,7 @@ tracker_data_update_statement_with_string (const gchar *graph,
object);
}
}
+#endif /* DISABLE_JOURNAL */
}
void
@@ -2960,6 +2979,7 @@ tracker_data_begin_transaction (GError **error)
tracker_db_interface_start_transaction (iface);
+#ifndef DISABLE_JOURNAL
if (!in_journal_replay) {
if (in_ontology_transaction) {
GError *n_error = NULL;
@@ -2976,6 +2996,7 @@ tracker_data_begin_transaction (GError **error)
tracker_db_journal_start_transaction (resource_time);
}
}
+#endif /* DISABLE_JOURNAL */
iface = tracker_db_manager_get_db_interface ();
@@ -3023,6 +3044,7 @@ tracker_data_commit_transaction (GError **error)
return;
}
+#ifndef DISABLE_JOURNAL
if (!in_journal_replay) {
if (has_persistent || in_ontology_transaction) {
tracker_db_journal_commit_db_transaction (&actual_error);
@@ -3039,6 +3061,7 @@ tracker_data_commit_transaction (GError **error)
/* Don't return, remainder of the function cleans things up */
}
}
+#endif /* DISABLE_JOURNAL */
get_transaction_modseq ();
if (has_persistent && !in_ontology_transaction) {
@@ -3107,7 +3130,10 @@ tracker_data_rollback_transaction (void)
tracker_db_interface_execute_query (iface, NULL, "PRAGMA cache_size = %d", TRACKER_DB_CACHE_SIZE_DEFAULT);
+ /* Runtime false in case of DISABLE_JOURNAL */
if (!in_journal_replay) {
+
+#ifndef DISABLE_JOURNAL
tracker_db_journal_rollback_transaction (&ignorable);
if (ignorable) {
@@ -3117,6 +3143,8 @@ tracker_data_rollback_transaction (void)
ignorable->message ? ignorable->message : "No error given");
g_error_free (ignorable);
}
+#endif /* DISABLE_JOURNAL */
+
if (rollback_callbacks) {
guint n;
@@ -3198,6 +3226,8 @@ tracker_data_sync (void)
tracker_db_journal_fsync ();
}
+#ifndef DISABLE_JOURNAL
+
void
tracker_data_replay_journal (TrackerBusyCallback busy_callback,
gpointer busy_user_data,
@@ -3502,3 +3532,16 @@ tracker_data_replay_journal (TrackerBusyCallback busy_callback,
tracker_db_journal_reader_shutdown ();
}
}
+
+#else
+
+void
+tracker_data_replay_journal (TrackerBusyCallback busy_callback,
+ gpointer busy_user_data,
+ const gchar *busy_status,
+ GError **error)
+{
+ g_critical ("Not good. We disabled the journal and yet replaying it got called");
+}
+
+#endif /* DISABLE_JOURNAL */
diff --git a/src/libtracker-data/tracker-db-journal.c b/src/libtracker-data/tracker-db-journal.c
index bc50d8e..a227025 100644
--- a/src/libtracker-data/tracker-db-journal.c
+++ b/src/libtracker-data/tracker-db-journal.c
@@ -43,6 +43,8 @@
#include "tracker-db-journal.h"
+#ifndef DISABLE_JOURNAL
+
#define MIN_BLOCK_SIZE 1024
/*
@@ -1096,7 +1098,6 @@ tracker_db_journal_append_resource (gint s_id,
g_return_val_if_fail (current_transaction_format != TRANSACTION_FORMAT_NONE, FALSE);
-
if (current_transaction_format == TRANSACTION_FORMAT_ONTOLOGY) {
ret = db_journal_writer_append_resource (&ontology_writer, s_id, uri);
} else {
@@ -2081,6 +2082,10 @@ tracker_db_journal_rotate (GError **error)
GError *n_error = NULL;
gboolean ret;
+#ifdef DISABLE_JOURNAL
+ g_critical ("Journal is disabled, yet a journal function got called");
+#endif
+
if (max == 0) {
gchar *directory;
GDir *journal_dir;
@@ -2170,3 +2175,13 @@ tracker_db_journal_rotate (GError **error)
return ret;
}
#endif /* GLib check */
+
+#else /* DISABLE_JOURNAL */
+void
+tracker_db_journal_set_rotating (gboolean do_rotating,
+ gsize chunk_size,
+ const gchar *rotate_to)
+{
+ /* intentionally left blank, used for internal API compatibility */
+}
+#endif /* DISABLE_JOURNAL */
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index fdee7f5..0d0fcf7 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -392,6 +392,7 @@ db_interface_create (TrackerDB db,
static void
db_manager_remove_journal (void)
{
+#ifndef DISABLE_JOURNAL
gchar *path;
gchar *directory, *rotate_to = NULL;
gsize chunk_size;
@@ -460,6 +461,7 @@ db_manager_remove_journal (void)
g_message ("%s", g_strerror (errno));
}
g_free (path);
+#endif /* DISABLE_JOURNAL */
}
static void
@@ -788,6 +790,9 @@ tracker_db_manager_init_locations (void)
"data",
NULL);
+ /* For DISABLE_JOURNAL case we should use g_get_user_data_dir here. For now
+ * keeping this as-is */
+
data_dir = g_build_filename (g_get_user_cache_dir (),
"tracker",
NULL);
@@ -1028,12 +1033,15 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
} else if ((flags & TRACKER_DB_MANAGER_READONLY) == 0) {
/* do not do shutdown check for read-only mode (direct access) */
- gboolean must_recreate;
+ gboolean must_recreate = FALSE;
+#ifndef DISABLE_JOURNAL
gchar *journal_filename;
+#endif /* DISABLE_JOURNAL */
/* Load databases */
g_message ("Loading databases files...");
+#ifndef DISABLE_JOURNAL
journal_filename = g_build_filename (g_get_user_data_dir (),
"tracker",
"data",
@@ -1044,6 +1052,7 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
NULL);
g_free (journal_filename);
+#endif /* DISABLE_JOURNAL */
if (!must_recreate && g_file_test (in_use_filename, G_FILE_TEST_EXISTS)) {
gsize size = 0;
@@ -1053,7 +1062,9 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
for (i = 1; i < G_N_ELEMENTS (dbs) && !must_recreate; i++) {
struct stat st;
TrackerDBStatement *stmt;
+#ifndef DISABLE_JOURNAL
gchar *busy_status;
+#endif /* DISABLE_JOURNAL */
if (g_stat (dbs[i].abs_filename, &st) == 0) {
size = st.st_size;
@@ -1090,6 +1101,7 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
loaded = TRUE;
+#ifndef DISABLE_JOURNAL
/* Report OPERATION - STATUS */
busy_status = g_strdup_printf ("%s - %s",
busy_operation,
@@ -1132,6 +1144,7 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
g_object_unref (cursor);
}
}
+#endif /* DISABLE_JOURNAL */
/* ensure that database has been initialized by an earlier tracker-store start
by checking whether Resource table exists */
@@ -1155,8 +1168,12 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
}
if (must_recreate) {
-
- g_message ("Database severely damaged. We will recreate it and replay the journal if available.");
+ g_message ("Database severely damaged. We will recreate it"
+#ifndef DISABLE_JOURNAL
+ " and replay the journal if available.");
+#else
+ ".");
+#endif /* DISABLE_JOURNAL */
perform_recreate (first_time, &internal_error);
if (internal_error) {
diff --git a/src/tracker-control/tracker-control-general.c b/src/tracker-control/tracker-control-general.c
index 4f8ba95..a789579 100644
--- a/src/tracker-control/tracker-control-general.c
+++ b/src/tracker-control/tracker-control-general.c
@@ -442,12 +442,12 @@ tracker_control_general_run (void)
if (hard_reset || soft_reset) {
guint log_handler_id;
+#ifndef DISABLE_JOURNAL
gchar *rotate_to;
TrackerDBConfig *db_config;
gsize chunk_size;
gint chunk_size_mb;
-
- db_config = tracker_db_config_new ();
+#endif /* DISABLE_JOURNAL */
/* Set log handler for library messages */
log_handler_id = g_log_set_handler (NULL,
@@ -457,6 +457,9 @@ tracker_control_general_run (void)
g_log_set_default_handler (log_handler, NULL);
+#ifndef DISABLE_JOURNAL
+ db_config = tracker_db_config_new ();
+
chunk_size_mb = tracker_db_config_get_journal_chunk_size (db_config);
chunk_size = (gsize) ((gsize) chunk_size_mb * (gsize) 1024 * (gsize) 1024);
rotate_to = tracker_db_config_get_journal_rotate_destination (db_config);
@@ -468,6 +471,8 @@ tracker_control_general_run (void)
g_free (rotate_to);
g_object_unref (db_config);
+#endif /* DISABLE_JOURNAL */
+
/* Clean up (select_cache_size and update_cache_size don't matter here) */
if (!tracker_db_manager_init (TRACKER_DB_MANAGER_REMOVE_ALL,
NULL,
@@ -485,12 +490,15 @@ tracker_control_general_run (void)
return EXIT_FAILURE;
}
-
+#ifndef DISABLE_JOURNAL
tracker_db_journal_init (NULL, FALSE, NULL);
+#endif /* DISABLE_JOURNAL */
tracker_db_manager_remove_all (hard_reset);
tracker_db_manager_shutdown ();
+#ifndef DISABLE_JOURNAL
tracker_db_journal_shutdown (NULL);
+#endif /* DISABLE_JOURNAL */
/* Unset log handler */
g_log_remove_handler (NULL, log_handler_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]