| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
TrackerMonitor doesn't try to merge events anymore besides the obvious
[CREATED|UPDATED]* + CHANGES_DONE_HINT. These tests simply don't reflect
current TrackerMonitor behavior so were removed.
|
|
|
|
|
|
| |
Because the way the file is created, we will get a create and an update
here. TrackerMonitor won't merge those together anymore, but
TrackerMinerFS will, so just acknowledge it's expected in this test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to implement our own caching and timeout mechanism on top
of GIO's, and our own "blacklisting" that would merge or transform
events depending on the previouly cached content.
This adds quite some extra latency in some cases on top of
GFileMonitor's rate (up to 2s), and even in some cases do produce
mistaken results (CREATE(a)+MOVE(a->b) != CREATE(b) if you are rewriting
a file, but how can TrackerMonitor know).
The code has been simplified in various fronts:
- (Almost) no event caching. Only CREATED/UPDATED events are possibly
cached awaiting for the CHANGES_DONE_HINT that must follow them.
- No event manipulation nor merging. GFileMonitor does a good job at
being truthful, and the upper layers do know better how to coalesce
events into a more reduced set of equivalent tasks, since there's
further info like file state in the database.
- The deprecated SEND_MOVED flag has been replaced by WATCH_MOVES. The
MOVED_IN/MOVED_OUT/RENAMED events can be handled in a simpler way each
than the deprecated MOVED event.
Overall this makes TrackerMonitor slightly more verbose (but still
consistent wrt sending a meaninful sequential set of changes), but more
reactive overall, since we now solely rely on GFileMonitor rate limits.
With this change, TrackerMinerFS is left as the only place that does
coalescing of events.
|
|
|
|
|
| |
We just can't do safe assumptions about its limits or behavior, seems
best to turn monitoring off altogether.
|
|
|
|
|
| |
The code supporting Solaris file monitors went away from glib ~2y
ago.
|
|
|
|
|
|
|
|
| |
The mentioned bug got fixed ~6y ago, but the changes making
use of the feature for some reason got stuck under a define
that's never defined.
This is an useful feature, so rely on it without further ado.
|
|
|
|
|
|
| |
The PAUSE_ON_IO feature required someone to notice it and
modify tracker code to #define instead of #undef. I discovered
it before, and chose to remove it instead.
|
|
|
|
|
|
| |
We deemed the directory as bad whenever any file didn't match the
filter, but files that don't match the filter should not trigger
it in one way or another.
|
|
|
|
|
|
| |
The assumption is that TrackerFileNotifier emits files that are
currently interned in the TrackerFileSystem. This event handler
broke the assumption in a couple of places.
|
|
|
|
|
|
| |
This is doubly cached in the TrackerFileSystem and as GObject qdata (and
obtained from the former in that case). Let's just rely on the former for
all.
|
|
|
|
|
|
|
|
| |
This is library code, so let's use g_debug() which obeys G_MESSAGES_DEBUG,
instead of g_message() which shall be printed unless there is an special
log handler that filters those out.
This code may run on 3rd party code, where we can't trust we'll have
a log handler that catches those from going to stdout.
|
|
|
|
|
|
|
| |
Despite the order implied here, the source/dest GFiles were emitted in
the inverse order. Funnily tracker-miners and everything else around
gets the order right, so it's really the header definition what is
backwards here.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace all 4 queues for the different create/update/delete/move
events with a single queue that contains generic QueueEvent
structs. The GList node of the last event is stored as GFile
qdata, in order to perform fast lookups when coalescing events.
queue_event_coalesce() will attempt to convert any two events
into less than that, it does rely on merging two events with
no related events in between, those should be coalesced (or
attempted to) when they arrive.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TrackerFileNotifier guarantees that parent files are emitted before any
children, the other usecase that this used to cover are explicit
tracker_miner_fs_check_file() calls which used to also index parent
directories, but it doesn't do that anymore since quite some time.
So the only remaining case where we could end up with a file whose parent
is neither being currently processed nor indexed is actual bugs. In that
case, the bug likely won't go away by trying harder, which leads to logging
for every child file, as they'll fail in cascade.
Let's be less stubborn here, warn (once!) about the missing file and ditch
all pending events happening on/inside it. People love filing bugs about
tracker logging stuff, so I don't think bugs will go unnoticed anyway.
|
|
|
|
| |
Seems quite fit to manage priv->current_index_root.
|
|
|
|
|
| |
We can steal data sooner in order to avoid unsetting the data in the early
return path.
|
|
|
|
|
|
|
|
|
|
| |
TrackerFileNotifier actually triggered mtime checks more often than
necessary. All of the sparql queries can be skip, also storing the
filesystem mtimes (because no sparql mtimes will be queried to
compare with).
We just need setting up our TrackerFileSystem tree, and adding
directory monitors, so do this bare minimum.
|
|
|
|
|
| |
We always perform those one directory at a time, so drop the array/len
arguments from directory content queries, and just pass a GFile around.
|
|
|
|
|
| |
We currently always process directories one by one, but we preserved the
variable depth handling. This can be simplified away.
|
|
|
|
|
|
|
|
|
| |
It was always called with depth=1 (return just direct children of the
given folder), so make this the default. Admittedly, the "crawler" name
is a bit of an stretch now.
The TrackerCrawler tests have also been removed the recursive tests,
since that's not possible anymore.
|
|
|
|
|
| |
This doesn't yield as many benefits as it does bring on the DBus backend,
but still worth implementing for consistence.
|
|
|
|
|
|
|
| |
This object can now be tested without raising tracker-store instances
nor other DBus facilities. This is a first stab at a comprehensive
set of tests checking TrackerMinerFS behavior (API, startup, monitoring,
...).
|
|
|
|
| |
The tracker-miners now live in a separate repo.
|
|
|
|
|
|
| |
This file doesn't exist, we generate the header file from scratch with a
script. Meson seems to have not raised an error in this situation in the
past, but with 0.43 the build fails.
|
|
|
|
| |
The correct keyword is 'value'.
|
|
|
|
|
|
|
| |
This module is only used in the tracker-miners repo. However, when
building this repo as a Meson subproject of tracker-miners.git, we
can only build one version of libtracker-common so we need to have
it present in our version.
|
|
|
|
|
| |
It's actually broken and doesn't get installed by the Autotools build.
The tracker-store refuses to start if this ontology is installed.
|
|
|
|
| |
Fixes an issue in tracker-store
|
|
|
|
|
| |
Some were missing altogether, and one was missing its enums which meant
it was rejected by the schema compiler.
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes:
GLib-GObject-CRITICAL **: g_object_unref: assertion
'G_IS_OBJECT (object)' failed
when calling "tracker daemon"
https://bugzilla.gnome.org/show_bug.cgi?id=788883
|
|
|
|
|
|
|
| |
Every command switch should return properly. Otherwise the code
reaches g_warn_if_reached () and a warning is printed.
https://bugzilla.gnome.org/show_bug.cgi?id=788680
|
|
|
|
|
|
| |
Those were unused (the test would stop at the third query), and I couldn't
quite figure out why they were added or what they were specifically
testing.
|
|
|
|
|
|
| |
Makes sense testing for those. Spotted by Coverity (CIDS: 1188421,
1188422, 1188423, 1188430, 1188431, 1188432, 1188433, 1188434, 1188435,
1298206, 1298207, 1298208, 1298209)
|
|
|
|
|
| |
Those may run in parallel, which is troublesome if all of them try to
remove the test directory after all tests are run.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tracker may end up with nfo:FileDataObject prior to handling monitor
events. Be it leftover data from previous bugs, explicit "tracker index"
calls, or data from some other application.
As we can't be really sure of the data consistence, always fallback to
a URN query so we don't break nie:url UNIQUE constraint (inverse functional
property in SPARQL parlance).
https://bugzilla.gnome.org/show_bug.cgi?id=786132
|
|
|
|
|
|
|
|
|
| |
file_notifier_traverse_tree() has the side effect of deleting mtime data,
as it's presumably not needed anymore, except here. Check whether the
directory was updated before notifying of the files inside, so we can
thoroughly check for deleted content.
https://bugzilla.gnome.org/show_bug.cgi?id=786132
|
|
|
|
|
|
| |
It may be actually destroyed if the decorator was cancelled.
https://bugzilla.gnome.org/show_bug.cgi?id=785701
|
|
|
|
| |
The tracker_notifier_new() function allows NULL for 'classes'.
|
|
|
|
|
| |
This was causing .pc files with wrong dependencies to be generated when
building with Meson, and probably other issues.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The 'classes' parameter wasn't annotated correctly.
|
|
|
|
|
| |
In some places I had hardcoded '1.0' instead of honouring
tracker_api_version variable. This is now fixed.
|
|
|
|
|
| |
We should maybe reword this to not include the API version, but I can't
see a simple way right now.
|