summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-11-19 16:45:34 +0100
committerCarlos Garnacho <carlosg@gnome.org>2018-07-20 18:27:32 +0200
commit0a4c92134288217341e670db5cf0f10cfb1bf4b6 (patch)
tree96e6b696fad89b37f082173eaa08098d4ba38164
parentda5283d94215646d0a8ccdb270b4b4adcb815969 (diff)
downloadtracker-0a4c92134288217341e670db5cf0f10cfb1bf4b6.tar.gz
tracker-store: Do not freeze events during TTL load
-rw-r--r--src/tracker-store/tracker-events.c19
-rw-r--r--src/tracker-store/tracker-events.h1
-rw-r--r--src/tracker-store/tracker-events.vapi1
-rw-r--r--src/tracker-store/tracker-store.vala7
4 files changed, 1 insertions, 27 deletions
diff --git a/src/tracker-store/tracker-events.c b/src/tracker-store/tracker-events.c
index 199dced29..870084709 100644
--- a/src/tracker-store/tracker-events.c
+++ b/src/tracker-store/tracker-events.c
@@ -27,7 +27,6 @@
#include "tracker-events.h"
typedef struct {
- gboolean frozen;
guint total;
GPtrArray *notify_classes;
} EventsPrivate;
@@ -64,10 +63,6 @@ tracker_events_add_insert (gint graph_id,
g_return_if_fail (rdf_types != NULL);
g_return_if_fail (private != NULL);
- if (private->frozen) {
- return;
- }
-
for (i = 0; i < rdf_types->len; i++) {
if (tracker_class_get_notify (rdf_types->pdata[i])) {
tracker_class_add_insert_event (rdf_types->pdata[i],
@@ -94,10 +89,6 @@ tracker_events_add_delete (gint graph_id,
g_return_if_fail (rdf_types != NULL);
g_return_if_fail (private != NULL);
- if (private->frozen) {
- return;
- }
-
for (i = 0; i < rdf_types->len; i++) {
if (tracker_class_get_notify (rdf_types->pdata[i])) {
tracker_class_add_delete_event (rdf_types->pdata[i],
@@ -122,16 +113,6 @@ tracker_events_reset_pending (void)
tracker_class_reset_pending_events (class);
}
-
- private->frozen = FALSE;
-}
-
-void
-tracker_events_freeze (void)
-{
- g_return_if_fail (private != NULL);
-
- private->frozen = TRUE;
}
static void
diff --git a/src/tracker-store/tracker-events.h b/src/tracker-store/tracker-events.h
index df9322ff1..1e962b90c 100644
--- a/src/tracker-store/tracker-events.h
+++ b/src/tracker-store/tracker-events.h
@@ -48,7 +48,6 @@ void tracker_events_add_delete (gint graph_id,
GPtrArray *rdf_types);
guint tracker_events_get_total (gboolean and_reset);
void tracker_events_reset_pending (void);
-void tracker_events_freeze (void);
TrackerClass** tracker_events_get_classes (guint *length);
G_END_DECLS
diff --git a/src/tracker-store/tracker-events.vapi b/src/tracker-store/tracker-events.vapi
index c232d8af5..fdd7b8af4 100644
--- a/src/tracker-store/tracker-events.vapi
+++ b/src/tracker-store/tracker-events.vapi
@@ -26,7 +26,6 @@ namespace Tracker {
public void add_delete (int graph_id, int subject_id, string subject, int pred_id, int object_id, string object, GLib.PtrArray rdf_types);
public uint get_total (bool and_reset);
public void reset_pending ();
- public void freeze ();
public unowned Class[] get_classes ();
}
}
diff --git a/src/tracker-store/tracker-store.vala b/src/tracker-store/tracker-store.vala
index 1f58256e8..bcc776180 100644
--- a/src/tracker-store/tracker-store.vala
+++ b/src/tracker-store/tracker-store.vala
@@ -233,12 +233,7 @@ public class Tracker.Store {
var file = File.new_for_path (turtle_task.path);
- Tracker.Events.freeze ();
- try {
- data.load_turtle_file (file);
- } finally {
- Tracker.Events.reset_pending ();
- }
+ data.load_turtle_file (file);
}
}
} catch (Error e) {