[tracker/wip/carlosg/sparql1.1: 3/56] libtracker-data: Drop journal



commit 0ea6ce078f967da15138f05fc2b1ea55b063b3df
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Mar 1 01:34:04 2019 +0100

    libtracker-data: Drop journal

 meson.build                                        |   11 -
 src/libtracker-data/meson.build                    |    1 -
 src/libtracker-data/tracker-data-backup.c          |  447 ----
 src/libtracker-data/tracker-data-manager.c         |  271 +--
 src/libtracker-data/tracker-data-manager.h         |    3 -
 src/libtracker-data/tracker-data-update.c          |  591 +-----
 src/libtracker-data/tracker-data-update.h          |    5 -
 src/libtracker-data/tracker-data.h                 |    1 -
 src/libtracker-data/tracker-db-interface-sqlite.c  |   12 -
 src/libtracker-data/tracker-db-journal.c           | 2165 --------------------
 src/libtracker-data/tracker-db-journal.h           |  169 --
 src/libtracker-data/tracker-db-manager.c           |   26 +-
 src/ontologies/11-rdf.ontology                     |    5 -
 src/ontologies/nepomuk/30-nie.ontology             |    3 +-
 src/tracker-store/tracker-main.vala                |   15 -
 src/tracker-store/tracker-resources.vala           |    5 -
 src/tracker/tracker-reset.c                        |   27 -
 tests/functional-tests/17-ontology-changes.py      |    1 -
 .../functional-tests/common/utils/configuration.py |    3 -
 .../common/utils/expectedFailure.py                |    4 -
 tests/functional-tests/configuration.json.in       |    3 +-
 tests/libtracker-data/meson.build                  |    1 -
 tests/libtracker-data/tracker-backup-test.c        |   18 -
 tests/libtracker-data/tracker-db-journal-test.c    |  405 ----
 tests/libtracker-data/tracker-ontology-test.c      |    6 -
 tests/libtracker-data/tracker-sparql-blank-test.c  |    2 -
 tests/libtracker-data/tracker-sparql-test.c        |    2 -
 27 files changed, 13 insertions(+), 4189 deletions(-)
---
diff --git a/meson.build b/meson.build
index 4a0452b30..da66a491d 100644
--- a/meson.build
+++ b/meson.build
@@ -241,8 +241,6 @@ endif
 conf = configuration_data()
 
 # Config that goes in config.h
-conf.set('DISABLE_JOURNAL', get_option('journal') == false)
-
 conf.set10('HAVE_TRACKER_FTS', enable_fts)
 
 conf.set('HAVE_BUILTIN_FTS', sqlite3_has_builtin_fts5)
@@ -289,15 +287,6 @@ conf.set('domain_ontologies_dir', join_paths('${datadir}', 'tracker', 'domain-on
 conf.set('FUNCTIONAL_TESTS_ONTOLOGIES_DIR', join_paths(meson.current_source_dir(), 'tests', 
'functional-tests', 'test-ontologies'))
 conf.set('FUNCTIONAL_TESTS_TRACKER_STORE_PATH', join_paths(meson.current_build_dir(), 'src', 
'tracker-store', 'tracker-store'))
 
-# This is set in an awkward way for compatibility with Autoconf. Switch it
-# to a normal boolean once we get rid of the Autotools build system. It's
-# only used in tests/functional-tests/common/utils/configuration.py.in.
-if get_option('journal')
-    conf.set('DISABLE_JOURNAL_TRUE', 'true')
-else
-    conf.set('DISABLE_JOURNAL_TRUE', '')
-endif
-
 configure_file(input: 'config.h.meson.in',
                output: 'config.h',
                configuration: conf)
diff --git a/src/libtracker-data/meson.build b/src/libtracker-data/meson.build
index 477681d05..e75803ce3 100644
--- a/src/libtracker-data/meson.build
+++ b/src/libtracker-data/meson.build
@@ -49,7 +49,6 @@ libtracker_data = library('tracker-data',
     'tracker-db-interface.c',
     'tracker-db-interface-sqlite.c',
     'tracker-db-manager.c',
-    'tracker-db-journal.c',
     'tracker-db-backup.c',
     'tracker-namespace.c',
     'tracker-ontology.c',
diff --git a/src/libtracker-data/tracker-data-backup.c b/src/libtracker-data/tracker-data-backup.c
index b68ab4004..f49c125aa 100644
--- a/src/libtracker-data/tracker-data-backup.c
+++ b/src/libtracker-data/tracker-data-backup.c
@@ -29,7 +29,6 @@
 #include "tracker-data-backup.h"
 #include "tracker-data-manager.h"
 #include "tracker-db-manager.h"
-#include "tracker-db-journal.h"
 #include "tracker-db-backup.h"
 
 typedef struct {
@@ -40,21 +39,6 @@ typedef struct {
        GError *error;
 } BackupSaveInfo;
 
-#ifndef DISABLE_JOURNAL
-
-typedef struct {
-       GPid pid;
-       guint stdout_watch_id;
-       guint stderr_watch_id;
-       GIOChannel *stdin_channel;
-       GIOChannel *stdout_channel;
-       GIOChannel *stderr_channel;
-       gpointer data;
-       GString *lines;
-} ProcessContext;
-
-#endif /* DISABLE_JOURNAL */
-
 static void
 free_backup_save_info (BackupSaveInfo *info)
 {
@@ -82,151 +66,6 @@ tracker_data_backup_error_quark (void)
        return g_quark_from_static_string (TRACKER_DATA_BACKUP_ERROR_DOMAIN);
 }
 
-#ifndef DISABLE_JOURNAL
-
-static void
-on_journal_copied (BackupSaveInfo *info, GError *error)
-{
-       if (info->callback) {
-               info->callback (error, info->user_data);
-       }
-
-       free_backup_save_info (info);
-}
-
-
-
-static void
-process_context_destroy (ProcessContext *context, GError *error)
-{
-       on_journal_copied (context->data, error);
-
-       if (context->lines) {
-               g_string_free (context->lines, TRUE);
-       }
-
-       if (context->stdin_channel) {
-               g_io_channel_shutdown (context->stdin_channel, FALSE, NULL);
-               g_io_channel_unref (context->stdin_channel);
-               context->stdin_channel = NULL;
-       }
-
-       if (context->stdout_watch_id != 0) {
-               g_source_remove (context->stdout_watch_id);
-               context->stdout_watch_id = 0;
-       }
-
-       if (context->stdout_channel) {
-               g_io_channel_shutdown (context->stdout_channel, FALSE, NULL);
-               g_io_channel_unref (context->stdout_channel);
-               context->stdout_channel = NULL;
-       }
-
-       if (context->stderr_watch_id != 0) {
-               g_source_remove (context->stderr_watch_id);
-               context->stderr_watch_id = 0;
-       }
-
-       if (context->stderr_channel) {
-               g_io_channel_shutdown (context->stderr_channel, FALSE, NULL);
-               g_io_channel_unref (context->stderr_channel);
-               context->stderr_channel = NULL;
-       }
-
-       if (context->pid != 0) {
-               g_spawn_close_pid (context->pid);
-               context->pid = 0;
-       }
-
-       g_free (context);
-}
-
-static gboolean
-read_line_of_tar_output (GIOChannel  *channel,
-                         GIOCondition condition,
-                         gpointer     user_data)
-{
-
-       if (condition & G_IO_ERR || condition & G_IO_HUP) {
-               ProcessContext *context = user_data;
-
-               context->stdout_watch_id = 0;
-               return FALSE;
-       }
-
-       /* TODO: progress support */
-       return TRUE;
-}
-
-static gboolean
-read_error_of_tar_output (GIOChannel  *channel,
-                          GIOCondition condition,
-                          gpointer     user_data)
-{
-       ProcessContext *context;
-       GIOStatus status;
-       gchar *line;
-
-       context = user_data;
-       status = G_IO_STATUS_NORMAL;
-
-       if (condition & G_IO_IN || condition & G_IO_PRI) {
-               do {
-                       GError *error = NULL;
-
-                       status = g_io_channel_read_line (channel, &line, NULL, NULL, &error);
-
-                       if (status == G_IO_STATUS_NORMAL) {
-                               if (context->lines == NULL)
-                                       context->lines = g_string_new (NULL);
-                               g_string_append (context->lines, line);
-                               g_free (line);
-                       } else if (error) {
-                               g_warning ("%s", error->message);
-                               g_error_free (error);
-                       }
-               } while (status == G_IO_STATUS_NORMAL);
-
-               if (status == G_IO_STATUS_EOF ||
-                   status == G_IO_STATUS_ERROR) {
-                       context->stderr_watch_id = 0;
-                       return FALSE;
-               }
-       }
-
-       if (condition & G_IO_ERR || condition & G_IO_HUP) {
-               context->stderr_watch_id = 0;
-               return FALSE;
-       }
-
-       return TRUE;
-}
-
-static void
-process_context_child_watch_cb (GPid     pid,
-                                gint     status,
-                                gpointer user_data)
-{
-       ProcessContext *context;
-       GError *error = NULL;
-
-       g_debug ("Process '%d' exited with code %d", pid, status);
-
-       context = (ProcessContext *) user_data;
-
-       if (context->lines) {
-               g_set_error (&error, TRACKER_DATA_BACKUP_ERROR,
-                            TRACKER_DATA_BACKUP_ERROR_UNKNOWN,
-                            "%s", context->lines->str);
-       }
-
-       process_context_destroy (context, error);
-}
-#endif /* DISABLE_JOURNAL */
-
-
-
-#ifdef DISABLE_JOURNAL
 static void
 on_backup_finished (GError *error,
                     gpointer user_data)
@@ -240,8 +79,6 @@ on_backup_finished (GError *error,
        free_backup_save_info (info);
 }
 
-#endif /* DISABLE_JOURNAL */
-
 /* delete all regular files from the directory */
 static void
 dir_remove_files (const gchar *path)
@@ -327,23 +164,6 @@ dir_move_to_temp (const gchar *path,
        g_free (temp_dir);
 }
 
-static void
-dir_move_from_temp (const gchar *path,
-                    const gchar *tmpname)
-{
-       gchar *temp_dir;
-
-       temp_dir = g_build_filename (path, tmpname, NULL);
-
-       /* ensure that no obsolete files are around */
-       dir_remove_files (path);
-       dir_move_files (temp_dir, path);
-
-       g_rmdir (temp_dir);
-
-       g_free (temp_dir);
-}
-
 static void
 move_to_temp (GFile *cache_location,
               GFile *data_location)
@@ -362,51 +182,6 @@ move_to_temp (GFile *cache_location,
        g_free (data_dir);
 }
 
-static void
-remove_temp (GFile *cache_location,
-             GFile *data_location)
-{
-       gchar *tmp_data_dir, *tmp_cache_dir;
-       GFile *child;
-
-       g_info ("Removing all database files from temporary location");
-
-       child = g_file_get_child (data_location, "tmp.data");
-       tmp_data_dir = g_file_get_path (child);
-       g_object_unref (child);
-
-       child = g_file_get_child (cache_location, "tmp.cache");
-       tmp_cache_dir = g_file_get_path (child);
-       g_object_unref (child);
-
-       dir_remove_files (tmp_data_dir);
-       dir_remove_files (tmp_cache_dir);
-
-       g_rmdir (tmp_data_dir);
-       g_rmdir (tmp_cache_dir);
-
-       g_free (tmp_cache_dir);
-       g_free (tmp_data_dir);
-}
-
-static void
-restore_from_temp (GFile *cache_location,
-                   GFile *data_location)
-{
-       gchar *data_dir, *cache_dir;
-
-       g_info ("Restoring all database files from temporary location");
-
-       data_dir = g_file_get_path (data_location);
-       cache_dir = g_file_get_path (cache_location);
-
-       dir_move_from_temp (data_dir, "tmp.data");
-       dir_move_from_temp (cache_dir, "tmp.cache");
-
-       g_free (cache_dir);
-       g_free (data_dir);
-}
-
 void
 tracker_data_backup_save (TrackerDataManager        *data_manager,
                           GFile                     *destination,
@@ -415,118 +190,6 @@ tracker_data_backup_save (TrackerDataManager        *data_manager,
                           gpointer                   user_data,
                           GDestroyNotify             destroy)
 {
-#ifndef DISABLE_JOURNAL
-       BackupSaveInfo *info;
-       ProcessContext *context;
-       gchar **argv;
-       gchar *path, *directory;
-       GError *local_error = NULL;
-       GDir *journal_dir;
-       GPid pid;
-       GPtrArray *files;
-       const gchar *f_name;
-       gboolean result;
-       gint stdin_fd, stdout_fd, stderr_fd;
-       guint i;
-
-       info = g_new0 (BackupSaveInfo, 1);
-       info->destination = g_object_ref (destination);
-       info->callback = callback;
-       info->user_data = user_data;
-       info->destroy = destroy;
-
-       path = g_file_get_path (destination);
-
-       directory = g_file_get_path (data_location);
-       journal_dir = g_dir_open (directory, 0, NULL);
-       f_name = g_dir_read_name (journal_dir);
-       files = g_ptr_array_new ();
-
-       while (f_name) {
-               if (f_name) {
-                       if (!g_str_has_prefix (f_name, TRACKER_DB_JOURNAL_FILENAME ".")) {
-                               f_name = g_dir_read_name (journal_dir);
-                               continue;
-                       }
-                       g_ptr_array_add (files, g_strdup (f_name));
-               }
-               f_name = g_dir_read_name (journal_dir);
-       }
-
-       g_dir_close (journal_dir);
-
-       argv = g_new0 (gchar*, files->len + 8);
-
-       argv[0] = g_strdup ("tar");
-       argv[1] = g_strdup ("-zcf");
-       argv[2] = path;
-       argv[3] = g_strdup ("-C");
-       argv[4] = directory;
-       argv[5] = g_strdup (TRACKER_DB_JOURNAL_FILENAME);
-       argv[6] = g_strdup (TRACKER_DB_JOURNAL_ONTOLOGY_FILENAME);
-
-       for (i = 0; i < files->len; i++) {
-               argv[i+7] = g_ptr_array_index (files, i);
-       }
-
-       /* It's fine to untar this asynchronous: the journal replay code can or
-        * should cope with unfinished entries at the end of the file, while
-        * restoring a backup made this way. */
-       result = g_spawn_async_with_pipes (NULL, /* working dir */
-                                          (gchar **) argv,
-                                          NULL, /* env */
-                                          G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
-                                          NULL, /* func to call before exec() */
-                                          0,
-                                          &pid,
-                                          &stdin_fd,
-                                          &stdout_fd,
-                                          &stderr_fd,
-                                          &local_error);
-
-       if (!result || local_error) {
-               GError *error = NULL;
-
-               g_set_error (&error,
-                            TRACKER_DATA_BACKUP_ERROR,
-                            TRACKER_DATA_BACKUP_ERROR_UNKNOWN,
-                            "%s, %s",
-                            _("Error starting “tar” program"),
-                            local_error ? local_error->message : _("No error given"));
-
-               g_warning ("%s", error->message);
-
-               on_journal_copied (info, error);
-
-               g_strfreev (argv);
-               g_clear_error (&local_error);
-
-               return;
-       }
-
-       context = g_new0 (ProcessContext, 1);
-       context->lines = NULL;
-       context->data = info;
-       context->pid = pid;
-       context->stdin_channel = g_io_channel_unix_new (stdin_fd);
-       context->stdout_channel = g_io_channel_unix_new (stdout_fd);
-       context->stderr_channel = g_io_channel_unix_new (stderr_fd);
-       context->stdout_watch_id = g_io_add_watch (context->stdout_channel,
-                                                  G_IO_IN | G_IO_PRI | G_IO_ERR | G_IO_HUP,
-                                                  read_line_of_tar_output,
-                                                  context);
-       context->stderr_watch_id = g_io_add_watch (context->stderr_channel,
-                                                  G_IO_IN | G_IO_PRI | G_IO_ERR | G_IO_HUP,
-                                                  read_error_of_tar_output,
-                                                  context);
-
-       g_child_watch_add (context->pid, process_context_child_watch_cb, context);
-
-       g_debug ("Process '%d' spawned for command:'%s %s %s'",
-                pid, argv[0], argv[1], argv[2]);
-
-       g_strfreev (argv);
-#else
        BackupSaveInfo *info;
        TrackerDBManager *db_manager;
        GFile *db_file;
@@ -546,7 +209,6 @@ tracker_data_backup_save (TrackerDataManager        *data_manager,
                                NULL);
 
        g_object_unref (db_file);
-#endif /* DISABLE_JOURNAL */
 }
 
 void
@@ -573,27 +235,13 @@ tracker_data_backup_restore (TrackerDataManager   *manager,
 
        db_manager = tracker_data_manager_get_db_manager (manager);
        info = g_new0 (BackupSaveInfo, 1);
-#ifndef DISABLE_JOURNAL
-       info->destination = g_file_get_child (data_location, TRACKER_DB_JOURNAL_FILENAME);
-#else
        info->destination = g_file_new_for_path (tracker_db_manager_get_file (db_manager));
-#endif /* DISABLE_JOURNAL */
 
        info->journal = g_object_ref (journal);
 
        if (g_file_query_exists (info->journal, NULL)) {
                TrackerDBManagerFlags flags;
-               TrackerDBJournal *journal_writer;
                guint select_cache_size, update_cache_size;
-#ifndef DISABLE_JOURNAL
-               GError *n_error = NULL;
-               GFile *parent = g_file_get_parent (info->destination);
-               gchar *tmp_stdout = NULL;
-               gchar *tmp_stderr = NULL;
-               gchar **argv;
-               gboolean result;
-               gint exit_status;
-#endif /* DISABLE_JOURNAL */
 
                flags = tracker_db_manager_get_flags (db_manager, &select_cache_size, &update_cache_size);
 
@@ -601,58 +249,6 @@ tracker_data_backup_restore (TrackerDataManager   *manager,
 
                move_to_temp (cache_location, data_location);
 
-#ifndef DISABLE_JOURNAL
-               argv = g_new0 (char*, 6);
-
-               argv[0] = g_strdup ("tar");
-               argv[1] = g_strdup ("-zxf");
-               argv[2] = g_file_get_path (info->journal);
-               argv[3] = g_strdup ("-C");
-               argv[4] = g_file_get_path (parent);
-
-               g_object_unref (parent);
-
-               /* Synchronous: we don't want the mainloop to run while copying the
-                * journal, as nobody should be writing anything at this point
-                */
-               result = g_spawn_sync (NULL, /* working dir */
-                                      argv,
-                                      NULL, /* env */
-                                      G_SPAWN_SEARCH_PATH,
-                                      NULL,
-                                      0,    /* timeout */
-                                      &tmp_stdout,
-                                      &tmp_stderr,
-                                      &exit_status,
-                                      &n_error);
-
-               if (!result || n_error) {
-                       g_set_error (&info->error,
-                                    TRACKER_DATA_BACKUP_ERROR,
-                                    TRACKER_DATA_BACKUP_ERROR_UNKNOWN,
-                                    "%s, %s",
-                                    _("Error starting “tar” program"),
-                                    n_error ? n_error->message : _("No error given"));
-                       g_warning ("%s", info->error->message);
-                       g_clear_error (&n_error);
-               } else if (tmp_stderr && strlen (tmp_stderr) > 0) {
-                       g_set_error (&info->error,
-                                    TRACKER_DATA_BACKUP_ERROR,
-                                    TRACKER_DATA_BACKUP_ERROR_UNKNOWN,
-                                    "%s",
-                                    tmp_stderr);
-               } else if (exit_status != 0) {
-                       g_set_error (&info->error,
-                                    TRACKER_DATA_BACKUP_ERROR,
-                                    TRACKER_DATA_BACKUP_ERROR_UNKNOWN,
-                                    _("Unknown error, “tar” exited with status %d"),
-                                    exit_status);
-               }
-
-               g_free (tmp_stderr);
-               g_free (tmp_stdout);
-               g_strfreev (argv);
-#else
                /* Turn off force-reindex here, no journal to replay so it wouldn't work */
                flags &= ~TRACKER_DB_MANAGER_FORCE_REINDEX;
 
@@ -660,7 +256,6 @@ tracker_data_backup_restore (TrackerDataManager   *manager,
                             G_FILE_COPY_OVERWRITE, 
                             NULL, NULL, NULL,
                             &info->error);
-#endif /* DISABLE_JOURNAL */
 
                tracker_db_manager_ensure_locations (db_manager, cache_location, data_location);
 
@@ -669,52 +264,10 @@ tracker_data_backup_restore (TrackerDataManager   *manager,
                 * or after a backup restoration). */
                tracker_db_manager_create_version_file (db_manager);
 
-#ifndef DISABLE_JOURNAL
-               journal_writer = tracker_db_journal_new (data_location, FALSE, &n_error);
-
-               if (n_error) {
-                       if (!info->error) {
-                               g_propagate_error (&info->error, n_error);
-                       } else {
-                               g_warning ("Ignored error while initializing journal during backup (another 
higher priority error already took place): %s",
-                                          n_error->message ? n_error->message : "No error given");
-                               g_error_free (n_error);
-                       }
-                       n_error = NULL;
-               }
-
-               if (info->error) {
-                       restore_from_temp (cache_location, data_location);
-               } else {
-                       remove_temp (cache_location, data_location);
-               }
-
-               tracker_db_journal_free (journal_writer, &n_error);
-
-               if (n_error) {
-                       g_warning ("Ignored error while shuting down journal during backup: %s",
-                                  n_error->message ? n_error->message : "No error given");
-                       g_error_free (n_error);
-               }
-#endif /* DISABLE_JOURNAL */
-
                manager = tracker_data_manager_new (flags, cache_location, data_location, ontology_location,
                                                    TRUE, TRUE, select_cache_size, update_cache_size);
                g_initable_init (G_INITABLE (manager), NULL, &internal_error);
 
-#ifdef DISABLE_JOURNAL
-               if (internal_error) {
-                       restore_from_temp (cache_location, data_location);
-                       g_object_unref (manager);
-
-                       manager = tracker_data_manager_new (flags, cache_location, data_location, 
ontology_location,
-                                                           TRUE, TRUE, select_cache_size, update_cache_size);
-                       g_initable_init (G_INITABLE (manager), NULL, &internal_error);
-               } else {
-                       remove_temp (cache_location, data_location);
-               }
-#endif /* DISABLE_JOURNAL */
-
                if (internal_error) {
                        g_propagate_error (error, internal_error);
                }
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index 116b1d4a9..cce5e3610 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -41,7 +41,6 @@
 #include "tracker-data-update.h"
 #include "tracker-db-interface-sqlite.h"
 #include "tracker-db-manager.h"
-#include "tracker-db-journal.h"
 #include "tracker-namespace.h"
 #include "tracker-ontologies.h"
 #include "tracker-ontology.h"
@@ -81,12 +80,6 @@ struct _TrackerDataManager {
        gint select_cache_size;
        gint update_cache_size;
 
-#ifndef DISABLE_JOURNAL
-       gboolean  in_journal_replay;
-       TrackerDBJournal *journal_writer;
-       TrackerDBJournal *ontology_writer;
-#endif
-
        TrackerDBManager *db_manager;
        TrackerOntologies *ontologies;
        TrackerData *data_update;
@@ -167,11 +160,6 @@ handle_unsupported_ontology_change (TrackerDataManager  *manager,
                                     const gchar         *attempted_new,
                                     GError             **error)
 {
-#ifndef DISABLE_JOURNAL
-       /* force reindex on restart */
-       tracker_db_manager_remove_version_file (manager->db_manager);
-#endif /* DISABLE_JOURNAL */
-
        g_set_error (error, TRACKER_DATA_ONTOLOGY_ERROR,
                     TRACKER_DATA_UNSUPPORTED_ONTOLOGY_CHANGE,
                     "%s: Unsupported ontology change for %s: can't change %s (old=%s, attempted new=%s)",
@@ -962,17 +950,6 @@ tracker_data_ontology_load_statement (TrackerDataManager  *manager,
                }
 
                tracker_property_set_writeback (property, (strcmp (object, "true") == 0));
-       } else if (g_strcmp0 (predicate, TRACKER_PREFIX_TRACKER "forceJournal") == 0) {
-               TrackerProperty *property;
-
-               property = tracker_ontologies_get_property_by_uri (manager->ontologies, subject);
-
-               if (property == NULL) {
-                       g_critical ("%s: Unknown property %s", ontology_path, subject);
-                       return;
-               }
-
-               tracker_property_set_force_journal (property, (strcmp (object, "true") == 0));
        } else if (g_strcmp0 (predicate, RDFS_SUB_PROPERTY_OF) == 0) {
                TrackerProperty *property, *super_property;
                gboolean is_new;
@@ -1921,37 +1898,6 @@ get_ontology_from_file (TrackerDataManager *manager,
        return ret;
 }
 
-#ifndef DISABLE_JOURNAL
-static void
-load_ontology_ids_from_journal (TrackerDBJournalReader  *reader,
-                                GHashTable             **uri_id_map_out,
-                                gint                    *max_id)
-{
-       GHashTable *uri_id_map;
-
-       uri_id_map = g_hash_table_new_full (g_str_hash, g_str_equal,
-                                           g_free, NULL);
-
-       while (tracker_db_journal_reader_next (reader, NULL)) {
-               TrackerDBJournalEntryType type;
-
-               type = tracker_db_journal_reader_get_entry_type (reader);
-               if (type == TRACKER_DB_JOURNAL_RESOURCE) {
-                       gint id;
-                       const gchar *uri;
-
-                       tracker_db_journal_reader_get_resource (reader, &id, &uri);
-                       g_hash_table_insert (uri_id_map, g_strdup (uri), GINT_TO_POINTER (id));
-                       if (id > *max_id) {
-                               *max_id = id;
-                       }
-               }
-       }
-
-       *uri_id_map_out = uri_id_map;
-}
-#endif /* DISABLE_JOURNAL */
-
 static void
 tracker_data_ontology_process_statement (TrackerDataManager *manager,
                                          const gchar        *graph,
@@ -2382,7 +2328,6 @@ db_get_static_data (TrackerDBInterface  *iface,
                                                      "\"tracker:writeback\", "
                                                      "(SELECT 1 FROM \"rdfs:Resource_rdf:type\" WHERE ID = 
\"rdf:Property\".ID AND "
                                                      "\"rdf:type\" = (SELECT ID FROM Resource WHERE Uri = '" 
NRL_INVERSE_FUNCTIONAL_PROPERTY "')), "
-                                                     "\"tracker:forceJournal\", "
                                                      "\"tracker:defaultValue\" "
                                                      "FROM \"rdf:Property\" ORDER BY ID");
 
@@ -2398,7 +2343,7 @@ db_get_static_data (TrackerDBInterface  *iface,
                        const gchar     *uri, *domain_uri, *range_uri, *secondary_index_uri, *default_value;
                        gboolean         multi_valued, indexed, fulltext_indexed;
                        gboolean         transient, is_inverse_functional_property;
-                       gboolean         writeback, force_journal;
+                       gboolean         writeback;
                        gint             id;
 
                        property = tracker_property_new (FALSE);
@@ -2473,18 +2418,7 @@ db_get_static_data (TrackerDBInterface  *iface,
                                is_inverse_functional_property = FALSE;
                        }
 
-                       /* tracker:forceJournal column */
-                       tracker_db_cursor_get_value (cursor, 11, &value);
-
-                       if (G_VALUE_TYPE (&value) != 0) {
-                               force_journal = (g_value_get_int64 (&value) == 1);
-                               g_value_unset (&value);
-                       } else {
-                               /* NULL */
-                               force_journal = TRUE;
-                       }
-
-                       default_value = tracker_db_cursor_get_string (cursor, 12, NULL);
+                       default_value = tracker_db_cursor_get_string (cursor, 11, NULL);
 
                        tracker_property_set_ontologies (property, manager->ontologies);
                        tracker_property_set_is_new_domain_index (property, 
tracker_ontologies_get_class_by_uri (manager->ontologies, domain_uri), FALSE);
@@ -2499,7 +2433,6 @@ db_get_static_data (TrackerDBInterface  *iface,
                        tracker_property_set_orig_multiple_values (property, multi_valued);
                        tracker_property_set_indexed (property, indexed);
                        tracker_property_set_default_value (property, default_value);
-                       tracker_property_set_force_journal (property, force_journal);
 
                        tracker_property_set_db_schema_changed (property, FALSE);
                        tracker_property_set_writeback (property, writeback);
@@ -2571,12 +2504,6 @@ insert_uri_in_resource_table (TrackerDataManager  *manager,
                return;
        }
 
-#ifndef DISABLE_JOURNAL
-       if (!manager->in_journal_replay) {
-               tracker_db_journal_append_resource (manager->ontology_writer, id, uri);
-       }
-#endif /* DISABLE_JOURNAL */
-
        g_object_unref (stmt);
 
 }
@@ -4165,9 +4092,6 @@ tracker_data_manager_initable_init (GInitable     *initable,
        gboolean read_only;
        GHashTable *uri_id_map = NULL;
        GError *internal_error = NULL;
-#ifndef DISABLE_JOURNAL
-       gboolean read_journal;
-#endif
 
        if (manager->initialized) {
                return TRUE;
@@ -4183,9 +4107,6 @@ tracker_data_manager_initable_init (GInitable     *initable,
        }
 
        read_only = (manager->flags & TRACKER_DB_MANAGER_READONLY) ? TRUE : FALSE;
-#ifndef DISABLE_JOURNAL
-       read_journal = FALSE;
-#endif
 
        /* Make sure we initialize all other modules we depend on */
        manager->data_update = tracker_data_new (manager);
@@ -4214,33 +4135,6 @@ tracker_data_manager_initable_init (GInitable     *initable,
 
        iface = tracker_db_manager_get_writable_db_interface (manager->db_manager);
 
-#ifndef DISABLE_JOURNAL
-       if (manager->journal_check && is_first_time_index) {
-               TrackerDBJournalReader *journal_reader;
-
-               /* Call may fail without notice (it's handled) */
-               journal_reader = tracker_db_journal_reader_new (manager->data_location, &internal_error);
-
-               if (journal_reader) {
-                       if (tracker_db_journal_reader_next (journal_reader, NULL)) {
-                               /* journal with at least one valid transaction
-                                  is required to trigger journal replay */
-                               read_journal = TRUE;
-                       }
-
-                       tracker_db_journal_reader_free (journal_reader);
-               } else if (internal_error) {
-                       if (!g_error_matches (internal_error,
-                                             TRACKER_DB_JOURNAL_ERROR,
-                                             TRACKER_DB_JOURNAL_ERROR_BEGIN_OF_JOURNAL)) {
-                               g_propagate_error (error, internal_error);
-                               return FALSE;
-                       } else {
-                               g_clear_error (&internal_error);
-                       }
-               }
-       }
-#endif /* DISABLE_JOURNAL */
 
        if (g_file_query_file_type (manager->ontology_location, G_FILE_QUERY_INFO_NONE, NULL) != 
G_FILE_TYPE_DIRECTORY) {
                gchar *uri;
@@ -4253,38 +4147,6 @@ tracker_data_manager_initable_init (GInitable     *initable,
                return FALSE;
        }
 
-#ifndef DISABLE_JOURNAL
-       if (read_journal) {
-               TrackerDBJournalReader *journal_reader;
-
-               manager->in_journal_replay = TRUE;
-               journal_reader = tracker_db_journal_reader_ontology_new (manager->data_location, 
&internal_error);
-
-               if (journal_reader) {
-                       /* Load ontology IDs from journal into memory */
-                       load_ontology_ids_from_journal (journal_reader, &uri_id_map, &max_id);
-                       tracker_db_journal_reader_free (journal_reader);
-               } else {
-                       if (internal_error) {
-                               if (!g_error_matches (internal_error,
-                                                         TRACKER_DB_JOURNAL_ERROR,
-                                                         TRACKER_DB_JOURNAL_ERROR_BEGIN_OF_JOURNAL)) {
-                                       g_propagate_error (error, internal_error);
-                                       return FALSE;
-                               } else {
-                                       g_clear_error (&internal_error);
-                               }
-                       }
-
-                       /* do not trigger journal replay if ontology journal
-                          does not exist or is not valid,
-                          same as with regular journal further above */
-                       manager->in_journal_replay = FALSE;
-                       read_journal = FALSE;
-               }
-       }
-#endif /* DISABLE_JOURNAL */
-
        if (is_first_time_index && !read_only) {
                sorted = get_ontologies (manager, manager->ontology_location, &internal_error);
 
@@ -4293,15 +4155,6 @@ tracker_data_manager_initable_init (GInitable     *initable,
                        return FALSE;
                }
 
-#ifndef DISABLE_JOURNAL
-               manager->ontology_writer = tracker_db_journal_ontology_new (manager->data_location, 
&internal_error);
-
-               if (internal_error) {
-                       g_propagate_error (error, internal_error);
-                       return FALSE;
-               }
-#endif /* DISABLE_JOURNAL */
-
                /* load ontology from files into memory (max_id starts at zero: first-time) */
 
                for (l = sorted; l; l = l->next) {
@@ -4340,26 +4193,6 @@ tracker_data_manager_initable_init (GInitable     *initable,
                        return FALSE;
                }
 
-#ifndef DISABLE_JOURNAL
-               if (uri_id_map) {
-                       /* restore all IDs from ontology journal */
-                       GHashTableIter iter;
-                       gpointer key, value;
-
-                       g_hash_table_iter_init (&iter, uri_id_map);
-                       while (g_hash_table_iter_next (&iter, &key, &value)) {
-                               insert_uri_in_resource_table (manager, iface,
-                                                             key,
-                                                             GPOINTER_TO_INT (value),
-                                                             &internal_error);
-                               if (internal_error) {
-                                       g_propagate_error (error, internal_error);
-                                       return FALSE;
-                               }
-                       }
-               }
-#endif /* DISABLE_JOURNAL */
-
                /* store ontology in database */
                for (l = sorted; l; l = l->next) {
                        import_ontology_file (manager, l->data, FALSE, !manager->journal_check);
@@ -4381,16 +4214,6 @@ tracker_data_manager_initable_init (GInitable     *initable,
                check_ontology = FALSE;
        } else {
                if (!read_only) {
-
-#ifndef DISABLE_JOURNAL
-                       manager->ontology_writer = tracker_db_journal_ontology_new (manager->data_location, 
&internal_error);
-
-                       if (internal_error) {
-                               g_propagate_error (error, internal_error);
-                               return FALSE;
-                       }
-#endif /* DISABLE_JOURNAL */
-
                        /* Load ontology from database into memory */
                        db_get_static_data (iface, manager, &internal_error);
                        check_ontology = (manager->flags & TRACKER_DB_MANAGER_DO_NOT_CHECK_ONTOLOGY) == 0;
@@ -4772,11 +4595,6 @@ tracker_data_manager_initable_init (GInitable     *initable,
                                g_propagate_error (error, internal_error);
                                return FALSE;
                        }
-
-#ifndef DISABLE_JOURNAL
-                       tracker_db_journal_free (manager->ontology_writer, NULL);
-                       manager->ontology_writer = NULL;
-#endif /* DISABLE_JOURNAL */
                }
 
                g_hash_table_unref (ontos_table);
@@ -4800,48 +4618,6 @@ tracker_data_manager_initable_init (GInitable     *initable,
        }
 
 skip_ontology_check:
-
-#ifndef DISABLE_JOURNAL
-       if (read_journal) {
-               /* Start replay */
-               tracker_data_replay_journal (manager->data_update,
-                                            busy_callback,
-                                            manager,
-                                            "Replaying journal",
-                                            &internal_error);
-
-               if (internal_error) {
-                       if (g_error_matches (internal_error, TRACKER_DB_INTERFACE_ERROR, 
TRACKER_DB_NO_SPACE)) {
-                               GError *n_error = NULL;
-                               tracker_db_manager_remove_all (manager->db_manager);
-                               g_clear_pointer (&manager->db_manager, tracker_db_manager_free);
-                               /* Call may fail without notice, we're in error handling already.
-                                * When fails it means that close() of journal file failed. */
-                               if (n_error) {
-                                       g_warning ("Error closing journal: %s",
-                                                  n_error->message ? n_error->message : "No error given");
-                                       g_error_free (n_error);
-                               }
-                       }
-
-                       g_hash_table_unref (uri_id_map);
-                       g_propagate_error (error, internal_error);
-                       return FALSE;
-               }
-
-               manager->in_journal_replay = FALSE;
-               g_hash_table_unref (uri_id_map);
-       }
-
-       /* open journal for writing */
-       manager->journal_writer = tracker_db_journal_new (manager->data_location, FALSE, &internal_error);
-
-       if (internal_error) {
-               g_propagate_error (error, internal_error);
-               return FALSE;
-       }
-#endif /* DISABLE_JOURNAL */
-
        /* If locale changed, re-create indexes */
        if (!read_only && tracker_db_manager_locale_changed (manager->db_manager, NULL)) {
                /* No need to reset the collator in the db interface,
@@ -4863,13 +4639,6 @@ skip_ontology_check:
 #endif
        }
 
-#ifndef DISABLE_JOURNAL
-       if (manager->ontology_writer) {
-               tracker_db_journal_free (manager->ontology_writer, NULL);
-               manager->ontology_writer = NULL;
-       }
-#endif /* DISABLE_JOURNAL */
-
        if (!read_only) {
                tracker_ontologies_sort (manager->ontologies);
        }
@@ -4978,28 +4747,6 @@ void
 tracker_data_manager_finalize (GObject *object)
 {
        TrackerDataManager *manager = TRACKER_DATA_MANAGER (object);
-#ifndef DISABLE_JOURNAL
-       GError *error = NULL;
-
-       /* Make sure we shutdown all other modules we depend on */
-       if (manager->journal_writer) {
-               tracker_db_journal_free (manager->journal_writer, &error);
-               manager->journal_writer = NULL;
-               if (error) {
-                       g_warning ("While shutting down journal %s", error->message);
-                       g_clear_error (&error);
-               }
-       }
-
-       if (manager->ontology_writer) {
-               tracker_db_journal_free (manager->ontology_writer, &error);
-               manager->ontology_writer = NULL;
-               if (error) {
-                       g_warning ("While shutting down ontology journal %s", error->message);
-                       g_clear_error (&error);
-               }
-       }
-#endif /* DISABLE_JOURNAL */
 
        g_clear_object (&manager->ontologies);
        g_clear_object (&manager->data_update);
@@ -5050,20 +4797,6 @@ tracker_data_manager_class_init (TrackerDataManagerClass *klass)
                                                              G_PARAM_READABLE));
 }
 
-#ifndef DISABLE_JOURNAL
-TrackerDBJournal *
-tracker_data_manager_get_journal_writer (TrackerDataManager *manager)
-{
-       return manager->journal_writer;
-}
-
-TrackerDBJournal *
-tracker_data_manager_get_ontology_writer (TrackerDataManager *manager)
-{
-       return manager->ontology_writer;
-}
-#endif
-
 TrackerOntologies *
 tracker_data_manager_get_ontologies (TrackerDataManager *manager)
 {
diff --git a/src/libtracker-data/tracker-data-manager.h b/src/libtracker-data/tracker-data-manager.h
index 5c6fb0e05..340451ed2 100644
--- a/src/libtracker-data/tracker-data-manager.h
+++ b/src/libtracker-data/tracker-data-manager.h
@@ -40,7 +40,6 @@ typedef struct _TrackerDataManagerClass TrackerDataManagerClass;
 #include <libtracker-data/tracker-data-update.h>
 #include <libtracker-data/tracker-db-interface.h>
 #include <libtracker-data/tracker-db-manager.h>
-#include <libtracker-data/tracker-db-journal.h>
 
 #define TRACKER_DATA_ONTOLOGY_ERROR                  (tracker_data_ontology_error_quark ())
 
@@ -73,8 +72,6 @@ void                 tracker_data_manager_shutdown            (TrackerDataManage
 
 GFile *              tracker_data_manager_get_cache_location  (TrackerDataManager *manager);
 GFile *              tracker_data_manager_get_data_location   (TrackerDataManager *manager);
-TrackerDBJournal *   tracker_data_manager_get_journal_writer  (TrackerDataManager *manager);
-TrackerDBJournal *   tracker_data_manager_get_ontology_writer (TrackerDataManager *manager);
 TrackerOntologies *  tracker_data_manager_get_ontologies      (TrackerDataManager *manager);
 
 TrackerDBManager *   tracker_data_manager_get_db_manager      (TrackerDataManager *manager);
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index 035ef59ae..c56fefaa7 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -34,7 +34,6 @@
 #include "tracker-data-query.h"
 #include "tracker-db-interface-sqlite.h"
 #include "tracker-db-manager.h"
-#include "tracker-db-journal.h"
 #include "tracker-ontologies.h"
 #include "tracker-property.h"
 #include "tracker-sparql-query.h"
@@ -158,8 +157,6 @@ struct _TrackerData {
        GPtrArray *rollback_callbacks;
        gint max_service_id;
        gint max_ontology_id;
-
-       TrackerDBJournal *journal_writer;
 };
 
 struct _TrackerDataClass {
@@ -733,12 +730,6 @@ ensure_resource_id (TrackerData *data,
                        g_error_free (error);
                }
 
-#ifndef DISABLE_JOURNAL
-               if (!data->in_journal_replay) {
-                       tracker_db_journal_append_resource (data->journal_writer, id, uri);
-               }
-#endif /* DISABLE_JOURNAL */
-
                g_hash_table_insert (data->update_buffer.resource_cache, g_strdup (uri), GINT_TO_POINTER 
(id));
        }
 
@@ -1918,16 +1909,6 @@ delete_first_object (TrackerData      *data,
                        g_propagate_error (error, new_error);
                        return change;
                }
-
-#ifndef DISABLE_JOURNAL
-               if (!data->in_journal_replay && change && !tracker_property_get_transient (field)) {
-                       tracker_db_journal_append_delete_statement_id (data->journal_writer,
-                                                                      graph_id,
-                                                                      data->resource_buffer->id,
-                                                                      pred_id,
-                                                                      object_id);
-               }
-#endif /* DISABLE_JOURNAL */
        } else {
                GValue *v;
                GError *new_error = NULL;
@@ -1945,33 +1926,6 @@ delete_first_object (TrackerData      *data,
                        return change;
                }
 
-#ifndef DISABLE_JOURNAL
-               if (!data->in_journal_replay && change && !tracker_property_get_transient (field)) {
-                       if (!tracker_property_get_force_journal (field) &&
-                               g_strcmp0 (graph, TRACKER_OWN_GRAPH_URN) == 0) {
-                               /* do not journal this statement extracted from filesystem */
-                               TrackerProperty *damaged;
-                               TrackerOntologies *ontologies;
-
-                               ontologies = tracker_data_manager_get_ontologies (data->manager);
-                               damaged = tracker_ontologies_get_property_by_uri (ontologies, 
TRACKER_PREFIX_TRACKER "damaged");
-
-                               tracker_db_journal_append_insert_statement (data->journal_writer,
-                                                                           graph_id,
-                                                                           data->resource_buffer->id,
-                                                                           tracker_property_get_id (damaged),
-                                                                           "true");
-                       } else {
-                               tracker_db_journal_append_delete_statement (data->journal_writer,
-                                                                           graph_id,
-                                                                           data->resource_buffer->id,
-                                                                           pred_id,
-                                                                           object_str);
-                       }
-               }
-
-#endif /* DISABLE_JOURNAL */
-
                if (data->delete_callbacks && change) {
                        guint n;
                        for (n = 0; n < data->delete_callbacks->len; n++) {
@@ -2510,7 +2464,6 @@ tracker_data_delete_statement (TrackerData  *data,
        gint                subject_id = 0;
        gboolean            change = FALSE;
        TrackerOntologies  *ontologies;
-       TrackerDBInterface *iface;
 
        g_return_if_fail (subject != NULL);
        g_return_if_fail (predicate != NULL);
@@ -2526,24 +2479,11 @@ tracker_data_delete_statement (TrackerData  *data,
 
        resource_buffer_switch (data, graph, subject, subject_id);
        ontologies = tracker_data_manager_get_ontologies (data->manager);
-       iface = tracker_data_manager_get_writable_db_interface (data->manager);
 
        if (object && g_strcmp0 (predicate, TRACKER_PREFIX_RDF "type") == 0) {
                class = tracker_ontologies_get_class_by_uri (ontologies, object);
                if (class != NULL) {
                        data->has_persistent = TRUE;
-
-#ifndef DISABLE_JOURNAL
-                       if (!data->in_journal_replay) {
-                               tracker_db_journal_append_delete_statement_id (
-                                      data->journal_writer,
-                                      (graph != NULL ? query_resource_id (data, graph) : 0),
-                                      data->resource_buffer->id,
-                                      tracker_data_query_resource_id (data->manager, iface, predicate),
-                                      tracker_class_get_id (class));
-                       }
-#endif /* DISABLE_JOURNAL */
-
                        cache_delete_resource_type (data, class, graph, 0);
                } else {
                        g_set_error (error, TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNKNOWN_CLASS,
@@ -2563,43 +2503,6 @@ tracker_data_delete_statement (TrackerData  *data,
                        }
 
                        change = delete_metadata_decomposed (data, field, object, 0, error);
-                       if (!data->in_journal_replay && change && !tracker_property_get_transient (field)) {
-                               if (tracker_property_get_data_type (field) == TRACKER_PROPERTY_TYPE_RESOURCE) 
{
-                                       object_id = query_resource_id (data, object);
-
-#ifndef DISABLE_JOURNAL
-                                       tracker_db_journal_append_delete_statement_id (data->journal_writer,
-                                                                                      graph_id,
-                                                                                      
data->resource_buffer->id,
-                                                                                      pred_id,
-                                                                                      object_id);
-#endif /* DISABLE_JOURNAL */
-                               } else {
-                                       object_id = 0;
-
-#ifndef DISABLE_JOURNAL
-                                       if (!tracker_property_get_force_journal (field) &&
-                                           g_strcmp0 (graph, TRACKER_OWN_GRAPH_URN) == 0) {
-                                               /* do not journal this statement extracted from filesystem */
-                                               TrackerProperty *damaged;
-
-                                               damaged = tracker_ontologies_get_property_by_uri (ontologies, 
TRACKER_PREFIX_TRACKER "damaged");
-
-                                               tracker_db_journal_append_insert_statement 
(data->journal_writer,
-                                                                                           graph_id,
-                                                                                           
data->resource_buffer->id,
-                                                                                           
tracker_property_get_id (damaged),
-                                                                                           "true");
-                                       } else {
-                                               tracker_db_journal_append_delete_statement 
(data->journal_writer,
-                                                                                           graph_id,
-                                                                                           
data->resource_buffer->id,
-                                                                                           pred_id,
-                                                                                           object);
-                                       }
-#endif /* DISABLE_JOURNAL */
-                               }
-                       }
                } else {
                        g_set_error (error, TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNKNOWN_PROPERTY,
                                     "Property '%s' not found in the ontology", predicate);
@@ -2923,18 +2826,6 @@ tracker_data_insert_statement_with_uri (TrackerData  *data,
                        }
                }
        }
-
-#ifndef DISABLE_JOURNAL
-       if (!data->in_journal_replay && change && !tracker_property_get_transient (property)) {
-               tracker_db_journal_append_insert_statement_id (
-                       data->journal_writer,
-                       (graph != NULL ? query_resource_id (data, graph) : 0),
-                       data->resource_buffer->id,
-                       final_prop_id,
-                       object_id);
-       }
-#endif /* DISABLE_JOURNAL */
-
 }
 
 void
@@ -2951,9 +2842,6 @@ tracker_data_insert_statement_with_string (TrackerData  *data,
        gint             graph_id = 0, pred_id = 0;
        TrackerOntologies *ontologies;
        TrackerDBInterface *iface;
-#ifndef DISABLE_JOURNAL
-       gboolean         tried = FALSE;
-#endif
 
        g_return_if_fail (subject != NULL);
        g_return_if_fail (predicate != NULL);
@@ -3002,9 +2890,6 @@ tracker_data_insert_statement_with_string (TrackerData  *data,
 
                graph_id = (graph != NULL ? query_resource_id (data, graph) : 0);
                pred_id = (pred_id != 0) ? pred_id : tracker_data_query_resource_id (data->manager, iface, 
predicate);
-#ifndef DISABLE_JOURNAL
-               tried = TRUE;
-#endif
 
                for (n = 0; n < data->insert_callbacks->len; n++) {
                        TrackerStatementDelegate *delegate;
@@ -3017,33 +2902,6 @@ tracker_data_insert_statement_with_string (TrackerData  *data,
                                            delegate->user_data);
                }
        }
-
-#ifndef DISABLE_JOURNAL
-       if (!data->in_journal_replay && change && !tracker_property_get_transient (property)) {
-               if (!tried) {
-                       graph_id = (graph != NULL ? query_resource_id (data, graph) : 0);
-                       pred_id = (pred_id != 0) ? pred_id : tracker_data_query_resource_id (data->manager, 
iface, predicate);
-               }
-               if (!tracker_property_get_force_journal (property) &&
-                   g_strcmp0 (graph, TRACKER_OWN_GRAPH_URN) == 0) {
-                       /* do not journal this statement extracted from filesystem */
-                       TrackerProperty *damaged;
-
-                       damaged = tracker_ontologies_get_property_by_uri (ontologies, TRACKER_PREFIX_TRACKER 
"damaged");
-                       tracker_db_journal_append_insert_statement (data->journal_writer,
-                                                                   graph_id,
-                                                                   data->resource_buffer->id,
-                                                                   tracker_property_get_id (damaged),
-                                                                   "true");
-               } else {
-                       tracker_db_journal_append_insert_statement (data->journal_writer,
-                                                                   graph_id,
-                                                                   data->resource_buffer->id,
-                                                                   pred_id,
-                                                                   object);
-               }
-       }
-#endif /* DISABLE_JOURNAL */
 }
 
 static void
@@ -3243,17 +3101,6 @@ tracker_data_update_statement_with_uri (TrackerData  *data,
                        }
                }
        }
-
-#ifndef DISABLE_JOURNAL
-       if (!data->in_journal_replay && change && !tracker_property_get_transient (property)) {
-               tracker_db_journal_append_update_statement_id (
-                       data->journal_writer,
-                       (graph != NULL ? query_resource_id (data, graph) : 0),
-                       data->resource_buffer->id,
-                       final_prop_id,
-                       object_id);
-       }
-#endif /* DISABLE_JOURNAL */
 }
 
 static void
@@ -3271,9 +3118,6 @@ tracker_data_update_statement_with_string (TrackerData  *data,
        gboolean multiple_values;
        TrackerOntologies *ontologies;
        TrackerDBInterface *iface;
-#ifndef DISABLE_JOURNAL
-       gboolean tried = FALSE;
-#endif
 #if HAVE_TRACKER_FTS
        GError *new_error = NULL;
 #endif /* HAVE_TRACKER_FTS */
@@ -3343,9 +3187,6 @@ tracker_data_update_statement_with_string (TrackerData  *data,
        if (((!multiple_values && data->delete_callbacks) || data->insert_callbacks) && change) {
                graph_id = (graph != NULL ? query_resource_id (data, graph) : 0);
                pred_id = (pred_id != 0) ? pred_id : tracker_data_query_resource_id (data->manager, iface, 
predicate);
-#ifndef DISABLE_JOURNAL
-               tried = TRUE;
-#endif
        }
 
        if ((!multiple_values && data->delete_callbacks) && change) {
@@ -3377,33 +3218,6 @@ tracker_data_update_statement_with_string (TrackerData  *data,
                                            delegate->user_data);
                }
        }
-
-#ifndef DISABLE_JOURNAL
-       if (!data->in_journal_replay && change && !tracker_property_get_transient (property)) {
-               if (!tried) {
-                       graph_id = (graph != NULL ? query_resource_id (data, graph) : 0);
-                       pred_id = (pred_id != 0) ? pred_id : tracker_data_query_resource_id (data->manager, 
iface, predicate);
-               }
-               if (!tracker_property_get_force_journal (property) &&
-                   g_strcmp0 (graph, TRACKER_OWN_GRAPH_URN) == 0) {
-                       /* do not journal this statement extracted from filesystem */
-                       TrackerProperty *damaged;
-
-                       damaged = tracker_ontologies_get_property_by_uri (ontologies, TRACKER_PREFIX_TRACKER 
"damaged");
-                       tracker_db_journal_append_update_statement (data->journal_writer,
-                                                                   graph_id,
-                                                                   data->resource_buffer->id,
-                                                                   tracker_property_get_id (damaged),
-                                                                   "true");
-               } else {
-                       tracker_db_journal_append_update_statement (data->journal_writer,
-                                                                   graph_id,
-                                                                   data->resource_buffer->id,
-                                                                   pred_id,
-                                                                   object);
-               }
-       }
-#endif /* DISABLE_JOURNAL */
 }
 
 void
@@ -3504,18 +3318,6 @@ tracker_data_begin_transaction (TrackerData  *data,
 
        tracker_db_interface_start_transaction (iface);
 
-#ifndef DISABLE_JOURNAL
-       if (!data->in_journal_replay) {
-               g_assert (data->journal_writer == NULL);
-               /* Pick the right journal writer for this transaction */
-               data->journal_writer = data->in_ontology_transaction ?
-                       tracker_data_manager_get_ontology_writer (data->manager) :
-                       tracker_data_manager_get_journal_writer (data->manager);
-
-               tracker_db_journal_start_transaction (data->journal_writer, data->resource_time);
-       }
-#endif /* DISABLE_JOURNAL */
-
        data->in_transaction = TRUE;
 }
 
@@ -3564,28 +3366,6 @@ tracker_data_commit_transaction (TrackerData  *data,
                return;
        }
 
-#ifndef DISABLE_JOURNAL
-       if (!data->in_journal_replay) {
-               g_assert (data->journal_writer != NULL);
-               if (data->has_persistent || data->in_ontology_transaction) {
-                       tracker_db_journal_commit_db_transaction (data->journal_writer, &actual_error);
-               } else {
-                       /* If we only had transient properties, then we must not write
-                        * anything to the journal. So we roll it back, but only the
-                        * journal's part. */
-                       tracker_db_journal_rollback_transaction (data->journal_writer);
-               }
-
-               data->journal_writer = NULL;
-
-               if (actual_error) {
-                       /* Can't write in journal anymore; quite a serious problem */
-                       g_propagate_error (error, actual_error);
-                       /* Don't return, remainder of the function cleans things up */
-               }
-       }
-#endif /* DISABLE_JOURNAL */
-
        get_transaction_modseq (data);
        if (data->has_persistent && !data->in_ontology_transaction) {
                data->transaction_modseq++;
@@ -3649,22 +3429,12 @@ tracker_data_rollback_transaction (TrackerData *data)
 
        tracker_db_interface_execute_query (iface, NULL, "PRAGMA cache_size = %d", 
TRACKER_DB_CACHE_SIZE_DEFAULT);
 
-       /* Runtime false in case of DISABLE_JOURNAL */
-       if (!data->in_journal_replay) {
-
-#ifndef DISABLE_JOURNAL
-               g_assert (data->journal_writer != NULL);
-               tracker_db_journal_rollback_transaction (data->journal_writer);
-               data->journal_writer = NULL;
-#endif /* DISABLE_JOURNAL */
-
-               if (data->rollback_callbacks) {
-                       guint n;
-                       for (n = 0; n < data->rollback_callbacks->len; n++) {
-                               TrackerCommitDelegate *delegate;
-                               delegate = g_ptr_array_index (data->rollback_callbacks, n);
-                               delegate->callback (delegate->user_data);
-                       }
+       if (data->rollback_callbacks) {
+               guint n;
+               for (n = 0; n < data->rollback_callbacks->len; n++) {
+                       TrackerCommitDelegate *delegate;
+                       delegate = g_ptr_array_index (data->rollback_callbacks, n);
+                       delegate->callback (delegate->user_data);
                }
        }
 }
@@ -3731,352 +3501,3 @@ tracker_data_load_turtle_file (TrackerData  *data,
 
        tracker_turtle_reader_load (file, data, error);
 }
-
-void
-tracker_data_sync (TrackerData *data)
-{
-#ifndef DISABLE_JOURNAL
-       TrackerDBJournal *writer;
-
-       writer = tracker_data_manager_get_journal_writer (data->manager);
-       if (writer)
-               tracker_db_journal_fsync (writer);
-
-       writer = tracker_data_manager_get_ontology_writer (data->manager);
-       if (writer)
-               tracker_db_journal_fsync (writer);
-#endif
-}
-
-#ifndef DISABLE_JOURNAL
-
-void
-tracker_data_replay_journal (TrackerData          *data,
-                             TrackerBusyCallback   busy_callback,
-                             gpointer              busy_user_data,
-                             const gchar          *busy_status,
-                             GError              **error)
-{
-       GError *journal_error = NULL;
-       TrackerProperty *rdf_type = NULL;
-       gint last_operation_type = 0;
-       const gchar *uri;
-       GError *n_error = NULL;
-       GFile *data_location;
-       TrackerDBJournalReader *reader;
-       TrackerOntologies *ontologies;
-
-       ontologies = tracker_data_manager_get_ontologies (data->manager);
-       rdf_type = tracker_ontologies_get_rdf_type (ontologies);
-
-       data_location = tracker_data_manager_get_data_location (data->manager);
-       reader = tracker_db_journal_reader_new (data_location, &n_error);
-       g_object_unref (data_location);
-
-       if (!reader) {
-               /* This is fatal (doesn't happen when file doesn't exist, does happen
-                * when for some other reason the reader can't be created) */
-               g_propagate_error (error, n_error);
-               return;
-       }
-
-       while (tracker_db_journal_reader_next (reader, &journal_error)) {
-               TrackerDBJournalEntryType type;
-               const gchar *object;
-               gint graph_id, subject_id, predicate_id, object_id;
-
-               type = tracker_db_journal_reader_get_entry_type (reader);
-               if (type == TRACKER_DB_JOURNAL_RESOURCE) {
-                       GError *new_error = NULL;
-                       TrackerDBInterface *iface;
-                       TrackerDBStatement *stmt;
-                       gint id;
-
-                       tracker_db_journal_reader_get_resource (reader, &id, &uri);
-
-                       iface = tracker_data_manager_get_writable_db_interface (data->manager);
-
-                       stmt = tracker_db_interface_create_statement (iface, 
TRACKER_DB_STATEMENT_CACHE_TYPE_UPDATE, &new_error,
-                                                                     "INSERT INTO Resource (ID, Uri) VALUES 
(?, ?)");
-
-                       if (stmt) {
-                               tracker_db_statement_bind_int (stmt, 0, id);
-                               tracker_db_statement_bind_text (stmt, 1, uri);
-                               tracker_db_statement_execute (stmt, &new_error);
-                               g_object_unref (stmt);
-                       }
-
-                       if (new_error) {
-                               g_warning ("Journal replay error: '%s'", new_error->message);
-                               g_error_free (new_error);
-                       }
-
-               } else if (type == TRACKER_DB_JOURNAL_START_TRANSACTION) {
-                       tracker_data_begin_transaction_for_replay (data, tracker_db_journal_reader_get_time 
(reader), NULL);
-               } else if (type == TRACKER_DB_JOURNAL_END_TRANSACTION) {
-                       GError *new_error = NULL;
-                       tracker_data_update_buffer_might_flush (data, &new_error);
-
-                       tracker_data_commit_transaction (data, &new_error);
-                       if (new_error) {
-                               /* Out of disk is an unrecoverable fatal error */
-                               if (g_error_matches (new_error, TRACKER_DB_INTERFACE_ERROR, 
TRACKER_DB_NO_SPACE)) {
-                                       g_propagate_error (error, new_error);
-                                       return;
-                               } else {
-                                       g_warning ("Journal replay error: '%s'", new_error->message);
-                                       g_clear_error (&new_error);
-                               }
-                       }
-               } else if (type == TRACKER_DB_JOURNAL_INSERT_STATEMENT ||
-                          type == TRACKER_DB_JOURNAL_UPDATE_STATEMENT) {
-                       GError *new_error = NULL;
-                       TrackerProperty *property = NULL;
-
-                       tracker_db_journal_reader_get_statement (reader, &graph_id, &subject_id, 
&predicate_id, &object);
-
-                       if (last_operation_type == -1) {
-                               tracker_data_update_buffer_flush (data, &new_error);
-                               if (new_error) {
-                                       g_warning ("Journal replay error: '%s'", new_error->message);
-                                       g_clear_error (&new_error);
-                               }
-                       }
-                       last_operation_type = 1;
-
-                       uri = tracker_ontologies_get_uri_by_id (ontologies, predicate_id);
-                       if (uri) {
-                               property = tracker_ontologies_get_property_by_uri (ontologies, uri);
-                       }
-
-                       if (property) {
-                               resource_buffer_switch (data, NULL, NULL, subject_id);
-
-                               if (type == TRACKER_DB_JOURNAL_UPDATE_STATEMENT) {
-                                       cache_update_metadata_decomposed (data, property, object, 0, NULL, 
graph_id, &new_error);
-                               } else {
-                                       cache_insert_metadata_decomposed (data, property, object, 0, NULL, 
graph_id, &new_error);
-                               }
-                               if (new_error) {
-                                       g_warning ("Journal replay error: '%s'", new_error->message);
-                                       g_clear_error (&new_error);
-                               }
-
-                       } else {
-                               g_warning ("Journal replay error: 'property with ID %d doesn't exist'", 
predicate_id);
-                       }
-
-               } else if (type == TRACKER_DB_JOURNAL_INSERT_STATEMENT_ID ||
-                          type == TRACKER_DB_JOURNAL_UPDATE_STATEMENT_ID) {
-                       GError *new_error = NULL;
-                       TrackerClass *class = NULL;
-                       TrackerProperty *property = NULL;
-
-                       tracker_db_journal_reader_get_statement_id (reader, &graph_id, &subject_id, 
&predicate_id, &object_id);
-
-                       if (last_operation_type == -1) {
-                               tracker_data_update_buffer_flush (data, &new_error);
-                               if (new_error) {
-                                       g_warning ("Journal replay error: '%s'", new_error->message);
-                                       g_clear_error (&new_error);
-                               }
-                       }
-                       last_operation_type = 1;
-
-                       uri = tracker_ontologies_get_uri_by_id (ontologies, predicate_id);
-                       if (uri) {
-                               property = tracker_ontologies_get_property_by_uri (ontologies, uri);
-                       }
-
-                       if (property) {
-                               if (tracker_property_get_data_type (property) != 
TRACKER_PROPERTY_TYPE_RESOURCE) {
-                                       g_warning ("Journal replay error: 'property with ID %d does not 
account URIs'", predicate_id);
-                               } else {
-                                       resource_buffer_switch (data, NULL, NULL, subject_id);
-
-                                       if (property == rdf_type) {
-                                               uri = tracker_ontologies_get_uri_by_id (ontologies, 
object_id);
-                                               if (uri) {
-                                                       class = tracker_ontologies_get_class_by_uri 
(ontologies, uri);
-                                               }
-                                               if (class) {
-                                                       cache_create_service_decomposed (data, class, NULL, 
graph_id);
-                                               } else {
-                                                       g_warning ("Journal replay error: 'class with ID %d 
not found in the ontology'", object_id);
-                                               }
-                                       } else {
-                                               GError *new_error = NULL;
-
-                                               /* add value to metadata database */
-                                               if (type == TRACKER_DB_JOURNAL_UPDATE_STATEMENT_ID) {
-                                                       cache_update_metadata_decomposed (data, property, 
NULL, object_id, NULL, graph_id, &new_error);
-                                               } else {
-                                                       cache_insert_metadata_decomposed (data, property, 
NULL, object_id, NULL, graph_id, &new_error);
-                                               }
-
-                                               if (new_error) {
-                                                       g_warning ("Journal replay error: '%s'", 
new_error->message);
-                                                       g_error_free (new_error);
-                                               }
-                                       }
-                               }
-                       } else {
-                               g_warning ("Journal replay error: 'property with ID %d doesn't exist'", 
predicate_id);
-                       }
-
-               } else if (type == TRACKER_DB_JOURNAL_DELETE_STATEMENT) {
-                       GError *new_error = NULL;
-                       TrackerProperty *property = NULL;
-
-                       tracker_db_journal_reader_get_statement (reader, &graph_id, &subject_id, 
&predicate_id, &object);
-
-                       if (last_operation_type == 1) {
-                               tracker_data_update_buffer_flush (data, &new_error);
-                               if (new_error) {
-                                       g_warning ("Journal replay error: '%s'", new_error->message);
-                                       g_clear_error (&new_error);
-                               }
-                       }
-                       last_operation_type = -1;
-
-                       resource_buffer_switch (data, NULL, NULL, subject_id);
-
-                       uri = tracker_ontologies_get_uri_by_id (ontologies, predicate_id);
-                       if (uri) {
-                               property = tracker_ontologies_get_property_by_uri (ontologies, uri);
-                       }
-
-                       if (property) {
-                               GError *new_error = NULL;
-
-                               if (object && rdf_type == property) {
-                                       TrackerClass *class;
-
-                                       class = tracker_ontologies_get_class_by_uri (ontologies, object);
-                                       if (class != NULL) {
-                                               cache_delete_resource_type (data, class, NULL, graph_id);
-                                       } else {
-                                               g_warning ("Journal replay error: 'class with '%s' not found 
in the ontology'", object);
-                                       }
-                               } else {
-                                       delete_metadata_decomposed (data, property, object, 0, &new_error);
-                               }
-
-                               if (new_error) {
-                                       g_warning ("Journal replay error: '%s'", new_error->message);
-                                       g_error_free (new_error);
-                               }
-
-                       } else {
-                               g_warning ("Journal replay error: 'property with ID %d doesn't exist'", 
predicate_id);
-                       }
-
-               } else if (type == TRACKER_DB_JOURNAL_DELETE_STATEMENT_ID) {
-                       GError *new_error = NULL;
-                       TrackerClass *class = NULL;
-                       TrackerProperty *property = NULL;
-
-                       tracker_db_journal_reader_get_statement_id (reader, &graph_id, &subject_id, 
&predicate_id, &object_id);
-
-                       if (last_operation_type == 1) {
-                               tracker_data_update_buffer_flush (data, &new_error);
-                               if (new_error) {
-                                       g_warning ("Journal replay error: '%s'", new_error->message);
-                                       g_clear_error (&new_error);
-                               }
-                       }
-                       last_operation_type = -1;
-
-                       uri = tracker_ontologies_get_uri_by_id (ontologies, predicate_id);
-                       if (uri) {
-                               property = tracker_ontologies_get_property_by_uri (ontologies, uri);
-                       }
-
-                       if (property) {
-
-                               resource_buffer_switch (data, NULL, NULL, subject_id);
-
-                               if (property == rdf_type) {
-                                       uri = tracker_ontologies_get_uri_by_id (ontologies, object_id);
-                                       if (uri) {
-                                               class = tracker_ontologies_get_class_by_uri (ontologies, uri);
-                                       }
-                                       if (class) {
-                                               cache_delete_resource_type (data, class, NULL, graph_id);
-                                       } else {
-                                               g_warning ("Journal replay error: 'class with ID %d not found 
in the ontology'", object_id);
-                                       }
-                               } else {
-                                       GError *new_error = NULL;
-
-                                       delete_metadata_decomposed (data, property, NULL, object_id, 
&new_error);
-
-                                       if (new_error) {
-                                               g_warning ("Journal replay error: '%s'", new_error->message);
-                                               g_error_free (new_error);
-                                       }
-                               }
-                       } else {
-                               g_warning ("Journal replay error: 'property with ID %d doesn't exist'", 
predicate_id);
-                       }
-               }
-
-               if (busy_callback) {
-                       busy_callback (busy_status,
-                                      tracker_db_journal_reader_get_progress (reader),
-                                      busy_user_data);
-               }
-       }
-
-
-       if (journal_error) {
-               GError *n_error = NULL;
-               gsize size;
-               GFile *cache_location, *data_location;
-               TrackerDBJournal *writer;
-
-               size = tracker_db_journal_reader_get_size_of_correct (reader);
-               tracker_db_journal_reader_free (reader);
-
-               cache_location = tracker_data_manager_get_cache_location(data->manager);
-               data_location = tracker_data_manager_get_data_location (data->manager);
-
-               writer = tracker_db_journal_new (data_location, FALSE, &n_error);
-               g_object_unref (cache_location);
-               g_object_unref (data_location);
-
-               if (n_error) {
-                       g_clear_error (&journal_error);
-                       /* This is fatal (journal file not writable, etc) */
-                       g_propagate_error (error, n_error);
-                       return;
-               }
-               tracker_db_journal_truncate (writer, size);
-               tracker_db_journal_free (writer, &n_error);
-
-               if (n_error) {
-                       g_clear_error (&journal_error);
-                       /* This is fatal (close of journal file failed after truncate) */
-                       g_propagate_error (error, n_error);
-                       return;
-               }
-
-               g_clear_error (&journal_error);
-       } else {
-               tracker_db_journal_reader_free (reader);
-       }
-}
-
-#else
-
-void
-tracker_data_replay_journal (TrackerData          *data,
-                             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-data-update.h b/src/libtracker-data/tracker-data-update.h
index 97fdcd6a9..6a5e0fcd5 100644
--- a/src/libtracker-data/tracker-data-update.h
+++ b/src/libtracker-data/tracker-data-update.h
@@ -120,11 +120,6 @@ void     tracker_data_load_turtle_file              (TrackerData               *
                                                      GError                   **error);
 
 void     tracker_data_sync                          (TrackerData               *data);
-void     tracker_data_replay_journal                (TrackerData               *data,
-                                                     TrackerBusyCallback        busy_callback,
-                                                     gpointer                   busy_user_data,
-                                                     const gchar               *busy_status,
-                                                     GError                   **error);
 
 /* Calling back */
 void     tracker_data_add_insert_statement_callback      (TrackerData               *data,
diff --git a/src/libtracker-data/tracker-data.h b/src/libtracker-data/tracker-data.h
index 7188774e0..dd443ffe4 100644
--- a/src/libtracker-data/tracker-data.h
+++ b/src/libtracker-data/tracker-data.h
@@ -34,7 +34,6 @@
 #include "tracker-db-config.h"
 #include "tracker-db-interface.h"
 #include "tracker-db-interface-sqlite.h"
-#include "tracker-db-journal.h"
 #include "tracker-db-manager.h"
 #include "tracker-namespace.h"
 #include "tracker-ontology.h"
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c 
b/src/libtracker-data/tracker-db-interface-sqlite.c
index 16d201d10..8cd0bcc01 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -2339,19 +2339,7 @@ execute_stmt (TrackerDBInterface  *interface,
                        g_critical ("SQLite error: %s (errno: %s)",
                                    sqlite3_errmsg (interface->db),
                                    g_strerror (errno));
-
-#ifndef DISABLE_JOURNAL
-                       g_unlink (interface->filename);
-
-                       g_error ("SQLite experienced an error with file:'%s'. "
-                                "It is either NOT a SQLite database or it is "
-                                "corrupt or there was an IO error accessing the data. "
-                                "This file has now been removed and will be recreated on the next start. "
-                                "Shutting down now.",
-                                interface->filename);
-
                        return;
-#endif /* DISABLE_JOURNAL */
                }
 
                if (!error) {
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index 556bea39d..09cbf4ded 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -40,7 +40,6 @@
 #include <libtracker-fts/tracker-fts.h>
 #endif
 
-#include "tracker-db-journal.h"
 #include "tracker-db-manager.h"
 #include "tracker-db-interface-sqlite.h"
 #include "tracker-db-interface.h"
@@ -196,11 +195,7 @@ db_set_params (TrackerDBInterface   *iface,
        GError *internal_error = NULL;
        TrackerDBStatement *stmt;
 
-#ifdef DISABLE_JOURNAL
        tracker_db_interface_execute_query (iface, NULL, "PRAGMA synchronous = NORMAL;");
-#else
-       tracker_db_interface_execute_query (iface, NULL, "PRAGMA synchronous = OFF;");
-#endif /* DISABLE_JOURNAL */
        tracker_db_interface_execute_query (iface, NULL, "PRAGMA encoding = \"UTF-8\"");
        tracker_db_interface_execute_query (iface, NULL, "PRAGMA auto_vacuum = 0;");
 
@@ -533,8 +528,6 @@ tracker_db_manager_ensure_locations (TrackerDBManager *db_manager,
        db_manager->locations_initialized = TRUE;
        db_manager->data_dir = g_file_get_path (cache_location);
 
-       /* For DISABLE_JOURNAL case we should use g_get_user_data_dir here. For now
-        * keeping this as-is */
        db_manager->user_data_dir = g_file_get_path (data_location);
 
        db_manager->db = db_base;
@@ -734,18 +727,10 @@ tracker_db_manager_new (TrackerDBManagerFlags   flags,
                /* Load databases */
                g_info ("Loading databases files...");
 
-#ifndef DISABLE_JOURNAL
-               must_recreate = !tracker_db_journal_reader_verify_last (data_location,
-                                                                       NULL);
-#endif /* DISABLE_JOURNAL */
-
                if (!must_recreate && g_file_test (db_manager->in_use_filename, G_FILE_TEST_EXISTS)) {
                        gsize size = 0;
                        struct stat st;
                        TrackerDBStatement *stmt;
-#ifndef DISABLE_JOURNAL
-                       gchar *busy_status;
-#endif /* DISABLE_JOURNAL */
 
                        g_info ("Didn't shut down cleanly last time, doing integrity checks");
 
@@ -787,11 +772,12 @@ tracker_db_manager_new (TrackerDBManagerFlags   flags,
                        }
 
                        if (!must_recreate) {
+                               gchar *busy_status;
+
                                db_manager->db.mtime = tracker_file_get_mtime (db_manager->db.abs_filename);
 
                                loaded = TRUE;
 
-#ifndef DISABLE_JOURNAL
                                /* Report OPERATION - STATUS */
                                busy_status = g_strdup_printf ("%s - %s",
                                                               busy_operation,
@@ -831,7 +817,6 @@ tracker_db_manager_new (TrackerDBManagerFlags   flags,
                                                g_object_unref (cursor);
                                        }
                                }
-#endif /* DISABLE_JOURNAL */
                        }
 
                        if (!must_recreate) {
@@ -853,12 +838,7 @@ tracker_db_manager_new (TrackerDBManagerFlags   flags,
                }
 
                if (must_recreate) {
-                       g_info ("Database severely damaged. We will recreate it"
-#ifndef DISABLE_JOURNAL
-                               " and replay the journal if available.");
-#else
-                               ".");
-#endif /* DISABLE_JOURNAL */
+                       g_info ("Database severely damaged. We will recreate it.");
 
                        perform_recreate (db_manager, first_time, &internal_error);
                        if (internal_error) {
diff --git a/src/ontologies/11-rdf.ontology b/src/ontologies/11-rdf.ontology
index 7f6532573..4bd497715 100644
--- a/src/ontologies/11-rdf.ontology
+++ b/src/ontologies/11-rdf.ontology
@@ -143,8 +143,3 @@ tracker:writeback a rdf:Property ;
        nrl:maxCardinality 1 ;
        rdfs:domain rdf:Property ;
        rdfs:range xsd:boolean .
-
-tracker:forceJournal a rdf:Property ;
-       nrl:maxCardinality 1 ;
-       rdfs:domain rdf:Property ;
-       rdfs:range xsd:boolean .
diff --git a/src/ontologies/nepomuk/30-nie.ontology b/src/ontologies/nepomuk/30-nie.ontology
index 919dfe06f..ea6d9bacc 100644
--- a/src/ontologies/nepomuk/30-nie.ontology
+++ b/src/ontologies/nepomuk/30-nie.ontology
@@ -97,8 +97,7 @@ nie:plainTextContent a rdf:Property ;
        rdfs:domain nie:InformationElement ;
        rdfs:range xsd:string ;
        tracker:fulltextIndexed true ;
-       tracker:weight 2 ;
-       tracker:forceJournal false .
+       tracker:weight 2 .
 
 nie:legal a rdf:Property ;
        rdfs:comment "A common superproperty for all properties that point at legal information about an 
Information Element";
diff --git a/src/tracker-store/tracker-main.vala b/src/tracker-store/tracker-main.vala
index 1e8d1ddd2..1248709b7 100644
--- a/src/tracker-store/tracker-main.vala
+++ b/src/tracker-store/tracker-main.vala
@@ -306,18 +306,6 @@ License which can be viewed at:
                        return 1;
                }
 
-               int chunk_size_mb = db_config.journal_chunk_size;
-               size_t chunk_size = (size_t) ((size_t) chunk_size_mb * (size_t) 1024 * (size_t) 1024);
-               string rotate_to = db_config.journal_rotate_destination;
-
-               if (rotate_to == "") {
-                       rotate_to = null;
-               }
-
-               bool do_rotating = (chunk_size_mb != -1);
-
-               Tracker.DBJournal.set_rotating (do_rotating, chunk_size, rotate_to);
-
                try {
                        connection = new Tracker.Direct.Connection (Sparql.ConnectionFlags.NONE,
                                                                    cache_location,
@@ -380,9 +368,6 @@ License which can be viewed at:
                config.disconnect (config_verbosity_id);
                config = null;
 
-               /* This will free rotate_to up in the journal code */
-               Tracker.DBJournal.set_rotating ((chunk_size_mb != -1), chunk_size, null);
-
                print ("\nOK\n\n");
 
                log_filename = null;
diff --git a/src/tracker-store/tracker-resources.vala b/src/tracker-store/tracker-resources.vala
index bb121805f..cda827250 100644
--- a/src/tracker-store/tracker-resources.vala
+++ b/src/tracker-store/tracker-resources.vala
@@ -167,15 +167,10 @@ public class Tracker.Resources : Object {
 
        public void sync (BusName sender) throws Error {
                var request = DBusRequest.begin (sender, "Resources.Sync");
-               var data_manager = Tracker.Main.get_data_manager ();
-               var data = data_manager.get_data ();
 
                var sparql_conn = Tracker.Main.get_sparql_connection ();
                sparql_conn.sync ();
 
-               // sync journal if available
-               data.sync ();
-
                request.end ();
        }
 
diff --git a/src/tracker/tracker-reset.c b/src/tracker/tracker-reset.c
index 488c5145e..0c3acf7fd 100644
--- a/src/tracker/tracker-reset.c
+++ b/src/tracker/tracker-reset.c
@@ -222,13 +222,6 @@ reset_run (void)
                GFile *cache_location, *data_location;
                gchar *dir;
                TrackerDBManager *db_manager;
-#ifndef DISABLE_JOURNAL
-               gchar *rotate_to;
-               TrackerDBConfig *db_config;
-               gsize chunk_size;
-               gint chunk_size_mb;
-               TrackerDBJournal *journal_writer;
-#endif /* DISABLE_JOURNAL */
 
                dir = g_build_filename (g_get_user_cache_dir (), "tracker", NULL);
                cache_location = g_file_new_for_path (dir);
@@ -246,22 +239,6 @@ reset_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);
-
-               /* This call is needed to set the journal's filename */
-               tracker_db_journal_set_rotating ((chunk_size_mb != -1),
-                                                chunk_size, rotate_to);
-
-               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) */
                db_manager = tracker_db_manager_new (TRACKER_DB_MANAGER_REMOVE_ALL,
                                                     cache_location, data_location,
@@ -285,10 +262,6 @@ reset_run (void)
                }
 
                tracker_db_manager_remove_all (db_manager);
-#ifndef DISABLE_JOURNAL
-               journal_writer = tracker_db_journal_new (data_location, FALSE, NULL);
-               tracker_db_journal_remove (journal_writer);
-#endif /* DISABLE_JOURNAL */
 
                tracker_db_manager_remove_version_file (db_manager);
                tracker_db_manager_free (db_manager);
diff --git a/tests/functional-tests/17-ontology-changes.py b/tests/functional-tests/17-ontology-changes.py
index 687757fe1..82b47a2ba 100755
--- a/tests/functional-tests/17-ontology-changes.py
+++ b/tests/functional-tests/17-ontology-changes.py
@@ -383,7 +383,6 @@ class PropertyMaxCardinality1toN (OntologyChangeTestTemplate):
     Change cardinality of a property from 1 to N. There shouldn't be any data loss
     """
 
-    @expectedFailureJournal()
     def test_property_cardinality_1_to_n(self):
         self.template_test_ontology_change()
 
diff --git a/tests/functional-tests/common/utils/configuration.py 
b/tests/functional-tests/common/utils/configuration.py
index 9fd8c1c64..ee6d4c80f 100644
--- a/tests/functional-tests/common/utils/configuration.py
+++ b/tests/functional-tests/common/utils/configuration.py
@@ -88,9 +88,6 @@ TEST_ONTOLOGIES_DIR = os.path.normpath(
 
 TRACKER_STORE_PATH = os.path.normpath(expandvars(config['TRACKER_STORE_PATH']))
 
-disableJournal = (len(config['disableJournal']) == 0)
-
-
 def generated_ttl_dir():
     if TOP_BUILDDIR:
         return os.path.join(TOP_BUILDDIR, 'tests', 'functional-tests', 'ttl')
diff --git a/tests/functional-tests/common/utils/expectedFailure.py 
b/tests/functional-tests/common/utils/expectedFailure.py
index e7f0eb68c..df9846978 100644
--- a/tests/functional-tests/common/utils/expectedFailure.py
+++ b/tests/functional-tests/common/utils/expectedFailure.py
@@ -35,10 +35,6 @@ def expectedFailureJournal():
     Decorator to handle tests that are expected to fail when journal is disabled.
     """
     def decorator(func):
-        # no wrapping if journal is enabled, test is expected to pass
-        if not cfg.disableJournal:
-            return func
-
         @wraps(func)
         def wrapper(*args, **kwargs):
             try:
diff --git a/tests/functional-tests/configuration.json.in b/tests/functional-tests/configuration.json.in
index 06a5be195..ed54c9886 100644
--- a/tests/functional-tests/configuration.json.in
+++ b/tests/functional-tests/configuration.json.in
@@ -3,6 +3,5 @@
     "RAW_EXEC_PREFIX": "@exec_prefix@",
     "RAW_DATAROOT_DIR": "@datarootdir@",
     "TEST_ONTOLOGIES_DIR": "@FUNCTIONAL_TESTS_ONTOLOGIES_DIR@",
-    "TRACKER_STORE_PATH": "@FUNCTIONAL_TESTS_TRACKER_STORE_PATH@",
-    "disableJournal": "@DISABLE_JOURNAL_TRUE@"
+    "TRACKER_STORE_PATH": "@FUNCTIONAL_TESTS_TRACKER_STORE_PATH@"
 }
diff --git a/tests/libtracker-data/meson.build b/tests/libtracker-data/meson.build
index dd559ccd7..f43720bc3 100644
--- a/tests/libtracker-data/meson.build
+++ b/tests/libtracker-data/meson.build
@@ -1,7 +1,6 @@
 libtracker_data_tests = [
     'backup',
     'crc32',
-    'db-journal',
     'ontology-change',
     'sparql-blank',
 ]
diff --git a/tests/libtracker-data/tracker-backup-test.c b/tests/libtracker-data/tracker-backup-test.c
index e3502dda5..8358001e5 100644
--- a/tests/libtracker-data/tracker-backup-test.c
+++ b/tests/libtracker-data/tracker-backup-test.c
@@ -123,8 +123,6 @@ test_backup_and_restore_helper (const gchar *db_location,
                                   NULL);
        test_schemas = g_file_new_for_path (ontologies);
 
-       tracker_db_journal_set_rotating (FALSE, G_MAXSIZE, NULL);
-
        manager = tracker_data_manager_new (TRACKER_DB_MANAGER_FORCE_REINDEX,
                                            data_location, data_location, test_schemas,
                                            FALSE, FALSE, 100, 100);
@@ -173,26 +171,10 @@ test_backup_and_restore_helper (const gchar *db_location,
        g_unlink (meta_db);
        g_free (meta_db);
 
-#ifndef DISABLE_JOURNAL
-       if (!journal) {
-               meta_db = g_build_path (G_DIR_SEPARATOR_S, db_location, "data", "tracker-store.journal", 
NULL);
-               g_unlink (meta_db);
-               g_free (meta_db);
-
-               meta_db = g_build_path (G_DIR_SEPARATOR_S, db_location, "data", 
"tracker-store.ontology.journal", NULL);
-               g_unlink (meta_db);
-               g_free (meta_db);
-       }
-#endif /* DISABLE_JOURNAL */
-
        meta_db = g_build_path (G_DIR_SEPARATOR_S, db_location, "data", ".meta.isrunning", NULL);
        g_unlink (meta_db);
        g_free (meta_db);
 
-#ifndef DISABLE_JOURNAL
-       tracker_db_journal_set_rotating (FALSE, G_MAXSIZE, NULL);
-#endif /* DISABLE_JOURNAL */
-
        manager = tracker_data_manager_new (TRACKER_DB_MANAGER_FORCE_REINDEX,
                                            data_location, data_location, test_schemas,
                                            FALSE, FALSE, 100, 100);
diff --git a/tests/libtracker-data/tracker-ontology-test.c b/tests/libtracker-data/tracker-ontology-test.c
index 6b1c47d1c..7abeb126e 100644
--- a/tests/libtracker-data/tracker-ontology-test.c
+++ b/tests/libtracker-data/tracker-ontology-test.c
@@ -183,8 +183,6 @@ test_ontology_init (TestInfo      *test_info,
 
        data_location = g_file_new_for_path (test_info->data_location);
 
-       tracker_db_journal_set_rotating (FALSE, G_MAXSIZE, NULL);
-
        /* first-time initialization */
        manager = tracker_data_manager_new (TRACKER_DB_MANAGER_FORCE_REINDEX,
                                            data_location, data_location, data_location,
@@ -194,8 +192,6 @@ test_ontology_init (TestInfo      *test_info,
 
        g_object_unref (manager);
 
-       tracker_db_journal_set_rotating (FALSE, G_MAXSIZE, NULL);
-
        /* initialization from existing database */
        manager = tracker_data_manager_new (0, data_location, data_location, data_location,
                                            FALSE, FALSE, 100, 100);
@@ -230,8 +226,6 @@ test_query (TestInfo      *test_info,
        ontology_location = g_file_new_for_path (ontology_path);
        g_free (ontology_path);
 
-       tracker_db_journal_set_rotating (FALSE, G_MAXSIZE, NULL);
-
        /* initialization */
        manager = tracker_data_manager_new (TRACKER_DB_MANAGER_FORCE_REINDEX,
                                            data_location, data_location, ontology_location,
diff --git a/tests/libtracker-data/tracker-sparql-blank-test.c 
b/tests/libtracker-data/tracker-sparql-blank-test.c
index fa4af4c30..76bcb8467 100644
--- a/tests/libtracker-data/tracker-sparql-blank-test.c
+++ b/tests/libtracker-data/tracker-sparql-blank-test.c
@@ -52,8 +52,6 @@ test_blank (TestInfo      *info,
 
        data_location = g_file_new_for_path (info->data_location);
 
-       tracker_db_journal_set_rotating (FALSE, G_MAXSIZE, NULL);
-
        /* initialization */
        manager = tracker_data_manager_new (TRACKER_DB_MANAGER_FORCE_REINDEX,
                                            data_location, data_location, data_location, /* loc, domain and 
ontology_name */
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index 2a10d4399..a509687c3 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -298,8 +298,6 @@ test_sparql_query (TestInfo      *test_info,
 
        data_location = g_file_new_for_path (test_info->data_location);
 
-       tracker_db_journal_set_rotating (FALSE, G_MAXSIZE, NULL);
-
        manager = tracker_data_manager_new (TRACKER_DB_MANAGER_FORCE_REINDEX,
                                            data_location, data_location, test_schemas, /* loc, domain and 
ontology_name */
                                            FALSE, FALSE, 100, 100);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]