summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add Abkhazian translationtracker-3.3Nart Tlisha2023-01-062-0/+507
|
* Release 3.3.33.3.3Carlos Garnacho2022-08-092-1/+5
|
* libtracker-sparql: Reply earlier to D-Bus query messages in endpointsCarlos Garnacho2022-08-091-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the endpoint waits to write the full cursor contents before replying to a Query D-Bus request. This relies on the caller side simultaneously issuing the D-Bus request and reading all data from the cursor, so that on the endpoint side writing the cursor does not end up blocking when the buffer grew too large. This relies on the bus TrackerSparqlConnection side doing exactly that, and splicing all cursor contents in a memory buffer, This is however not friendly to an approach using input streams, since the TrackerSparqlConnection side would read pipe contents incrementally while iterating the cursor, but it didn't get it yet since the endpoint will end up clogging the pipe and the Query request will not be replied. In order to fix this, reply the D-Bus request before writing the cursor contents, so that the other end can get ahead with creating a TrackerSparqlCursor that will stream the contents during iteration. As a result the errors happening during writes are not forwarded to the other end anymore, but since they would mostly consist of write errors, it sounds likely the other end had some involvement in that (e.g. dying or prematurely closing the cursor). (cherry-picked from commit 425411307ea0487279fb768dd69368da4ac59bd4)
* Release 3.3.23.3.2Carlos Garnacho2022-07-062-1/+13
|
* Merge branch 'wip/carlosg/backports-3.3' into 'tracker-3.3'Sam Thursfield2022-07-0516-139/+109
|\ | | | | | | | | Backports for 3.3 See merge request GNOME/tracker!521
| * ci: Do not test build website on non-main branchCarlos Garnacho2022-07-051-0/+2
| |
| * libtracker-data: Fetch nrl:modified from all graphsCarlos Garnacho2022-07-051-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | We are just looking at the default graph when initializing nrl:modified after opening an existing database. Since the default graph possibly only contains part of the data, we are possibly/likely missing the latest sequence number if used on other graphs. Check all graphs here relying on our virtual tracker_triples table, so we are ensured to get the actual latest/greatest nrl:modified sequence that was previously used from the union of all graphs. This ensures us to get always a fresh sequence number for newly inserted data.
| * libtracker-common: Drop unused enumCarlos Garnacho2022-07-058-125/+0
| | | | | | | | | | And GType boilerplate generation. This enum is entirely unused in the tracker code and is thus unneeded.
| * build: CLI depends on libtracker-commonSam Thursfield2022-07-051-1/+1
| | | | | | | | | | Fix occasional build failures such as this one: https://gitlab.gnome.org/GNOME/tracker/-/jobs/2101449
| * tests: Specify missing order in testCarlos Garnacho2022-07-051-0/+1
| | | | | | | | | | | | | | | | | | The order of the returned resultset was implicit and up to SQLite, but the order for this test started changing starting with SQLite 3.39.0. Make the order explicit, so that SQLite implementation details don't leak up here. Closes: https://gitlab.gnome.org/GNOME/tracker/-/issues/370
| * core: Handle conversion of values for superproperties with differing typesCarlos Garnacho2022-07-051-2/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not quite correct, but it is the most straightforward way to sort of handle situations in our own Nepomuk ontology that superproperties have different rdfs:range than their subproperties. For these cases, handle the conversion of the value. Since the worst case (and the one we happen to exercise) is about converting resource ROWIDs to strings, handle this specific situation. This helps in serialization and deserialization of this data, since the ROWIDs were not something that could be replicated in other databases without mismatches (e.g. the resource having a different ROWID in the new database importing the data) or worse (e.g. cardinality or other constraints broken).
| * libtracker-sparql: Do not attempt to rebuild non-existing FTS tablesCarlos Garnacho2022-07-051-7/+21
| | | | | | | | | | | | | | | | | | If a database/ontology has no fulltext-indexed properties, we do not create a corresponding FTS table. Likewise, parser/locale updates should not attempt to update it, or we will get a "SQL logic error" poking non-existing tables. Closes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2278
| * libtracker-sparql: Avoid URN queries in DBus endpoint notificationsCarlos Garnacho2022-07-053-2/+18
|/ | | | | | | | | | | | | | | | | | | | | | | When a connection is proxied through a TrackerEndpointDBus, there are possibly 2 levels of TrackerNotifiers, one being used in the service itself to trigger the DBus signal, and another on any listening client handling those notifications. However, both of these are doing an additional query to fetch the URN for each of the notified elements. Since we only pass ROWIDs in the DBus signal to make the signal data as compact as possible, we can avoid this query on the service side. Any client listening to notifications will perform its own URN queries anyway. So avoid this piece of pointless busywork in the service side, and special case that the internal notifiers used by endpoints should not perform the query for URN data. This does not make anything noticeably faster (perhaps endpoint signal emission is a bit more snappy now, if anything) as all querying and cursor handling happens lazily in a separate thread fairly detached from the rest of the machinery. However it's still less CPU cycles used overall.
* Release 3.3.13.3.1Carlos Garnacho2022-05-312-1/+13
|
* Merge branch 'wip/carlosg/backports-3.3' into 'tracker-3.3'Carlos Garnacho2022-05-303-3/+6
|\ | | | | | | | | Backports for 3.3.x See merge request GNOME/tracker!514
| * libtracker-data: Ensure blank node row ids are integer typedRay Strode2022-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 6cf3168302350f3fd3ef7f8bf79022950563300e tracker sometimes returns an unqualified row id to applications that are asking for a fully qualfied blank node urn. This is because sometimes it generates URN with a text type instead of an integer type, and so `SparqlPrintIRI` fails to recognize it as a blank node identifier. The result is that gnome-photos fails to match up album collections internally between different queries, because sometimes tracker returns the fully qualified urn and sometimes it returns the bare row id. This commit address the problem by introducing a cast in the query that is returning the row id as text instead of as an integer. Fix suggested by Carlos Garnacho. Closes https://gitlab.gnome.org/GNOME/tracker/-/issues/363 (cherry-picked from commit 2a7509055e36d1d871e7da337d95f729e7d8c58d)
| * libtracker-sparql: Bump FTS parser versionCarlos Garnacho2022-05-301-1/+1
| | | | | | | | | | | | | | | | | | There's no actual parser changes, but we want to trigger a rebuild of all tokenization info in the FTS table. This will have the side effect of fixing databases that got the FTS table broken. (cherry-picked from commit 26f5af29a9e7955025134454c28d342747d47265)
| * libtracker-sparql: Remove value from array after deletionCarlos Garnacho2022-05-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every other path that fetches the array of previous values for deletion also deletes the GValue from the cached array. This place handling our almost unused, non-standard INSERT OR REPLACE syntax, was missing this. Since the handling of FTS updates later poke the cached values to update all FTS columns, this may result in the deleted value being inserted again in the FTS tree, resulting in another unbalanced tree situation (as the actual column containing the data and the token tree for the corresponding content-less column in the FTS table differ). An example of this situation is: INSERT OR REPLACE { <a> a nie:InformationElement; nie:title 'title'; } INSERT OR REPLACE { <a> a nie:InformationElement; nie:title 'title2'; } SELECT ?u { ?u fts:match 'title' } Returning matches for the old value. (cherry-picked from commit 6067f032d3b7ed4614bedf840b4edc86165567e3)
| * libtracker-sparql: Fix handling of partial FTS deletionCarlos Garnacho2022-05-301-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the SQL interface offered to update external content and content-less FTS tables, updates on FTS columns must happen as 2 separate updates, one to delete tokenization data from the tree, and another to update. Due to our own current implementation details, the FTS table is synchronized per-row, meaning that we always want a FTS update after a FTS delete, in order to synchronize other properties properly. Fix the code to force one in place, instead of relying on loosely related paths to set it. This was unnoticed because most often FTS deletes are either a part of an FTS update, or part of a resource deletion (thus no FTS properties are left for the resource). But with the right circumstances, a FTS deletion may come alone, thus it would not trigger the later expected FTS update. This may unbalance the FTS tree, causing SQLITE_CORRUPT on later updates. An example of this is: INSERT DATA { <a> a nfo:InformationElement ; nie:title 'b' ; nie:identifier 'c' . } DELETE WHERE { <a> nie:title ?t } Fix this situation by always scheduling a FTS update after a delete. The FTS update will be opted out on actual full deletes otherwise (concretely by early out due to the FTS update having no actual changes). Fixes: https://gitlab.gnome.org/GNOME/tracker/-/issues/361 (cherry-picked from commit cb82665dc9eee21f3aea38f4d55c1f48440f562e)
* Merge branch 'wip/carlosg/doc-updates' into 'master'Sam Thursfield2022-04-0516-58/+493
|\ | | | | | | | | | | | | Documentation improvements Closes #349 See merge request GNOME/tracker!497
| * manpages: Stress further the usage of --loopback in tracker3-endpointCarlos Garnacho2022-04-031-0/+3
| |
| * docs: Add "security" section under "implementation details"Carlos Garnacho2022-04-033-0/+202
| | | | | | | | | | | | | | Paraphrase and complete some of the security considerations brought up at the various SPARQL reference documents. Fixes: https://gitlab.gnome.org/GNOME/tracker/-/issues/349
| * libtracker-sparql: Add further docs to TrackerEndpointHttpCarlos Garnacho2022-04-031-1/+11
| | | | | | | | | | | | Stress further the importance around ::block-remote-address and GTlsCertificate, and mention that HTTP endpoints do not implement updates.
| * docs: Add Javascript examplesCarlos Garnacho2022-04-035-4/+127
| |
| * docs: Add python examplesCarlos Garnacho2022-04-035-4/+136
| |
| * libtracker-sparql: Mark parameter as nullableCarlos Garnacho2022-04-032-5/+5
| | | | | | | | This is missing in introspection annotations.
| * docs: Remove hack to embed filesCarlos Garnacho2022-04-033-56/+21
|/ | | | | This is something hotdoc can do for us, there is no need for an script here.
* Merge branch 'libtracker-remote-linking' into 'master'Carlos Garnacho2022-03-301-44/+75
|\ | | | | | | | | | | | | libtracker-sparql: Fix libtracker-remote-soup{2,3} modules linking Closes #358 See merge request GNOME/tracker!501
| * build: Generalize hack to ensure soup modules are a dependency of GIRCarlos Garnacho2022-03-301-11/+21
| | | | | | | | | | | | | | | | | | | | We want to avoid meson version bumps, but this hack to ensure that GIR generation depends on the soup modules (since they will be pulled at runtime by g-ir-scanner during introspection) does not work across all meson versions. Use different hacks dependent on the meson version, so that the modules are a build-time dependency of the GIR target.
| * libtracker-sparql: Fix libtracker-remote-soup{2,3} modules linkingDaniele Nicolodi2022-03-301-44/+65
|/ | | | | | | | | | | | | | | | | | The modules should link dynamically and not statically with libteacker-sparql. Linking statically results in the modules and the shared library to export definitions for the same GObjects, resulting in type registration errors. The tracker-remote modules however need access to the private TrackerSerializer classes. Unless these GObject are made public, their definition must be linked in the modules too. As the code implementing TrackerSerializer and the specialized version is pretty small, the simplest solution is to compile the sources twice, without going through an intermediate library. The definitions being private to libtracker-sparql and to the libtracker-remote-soup{2,3} modules, having two defintions for them does not cause issues. Fixes #358 and likely #350 too.
* Merge branch 'wip/carlosg/more-sparql-fixes' into 'master'Sam Thursfield2022-03-2730-48/+139
|\ | | | | | | | | Sparql compliance fixes See merge request GNOME/tracker!503
| * tests: Add tests for negated property pathsCarlos Garnacho2022-03-2723-0/+36
| |
| * libtracker-data: Fix negated property pathsCarlos Garnacho2022-03-273-44/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix some brokenness in dealing with the parse tree, and make the algebra actually equivalent to the spec. There were two rough points: - Negated inverse paths cannot be implemented on top of the inverse path implementation. "<a> !^:prop <b>" must match all properties from <b> to <a> that are not :prop. - The combination of inverse and regular paths in a negated path (e.g. "<a> !(:prop|^:prop) <b>") must intersect the inverse and regular paths separately and join those with an alternate '|' path. This makes negated property paths consistent with the definition at https://www.w3.org/TR/sparql11-query/#sparqlTranslatePathExpressions and following algebra.
| * libtracker-data: Add column to triples table to get raw valueCarlos Garnacho2022-03-271-3/+8
| | | | | | | | | | This column contains the object value as stored in the actual tables, not a string representation.
| * tests: Add basic test around long string literalsCarlos Garnacho2022-03-273-0/+3
| | | | | | | | | | Ensure these are parsed correctly, and are able to contain quotes of the same nature.
| * libtracker-data: Try STRING_LITERAL_LONG1/2 before STRING_LITERAL1/2Carlos Garnacho2022-03-271-1/+1
|/ | | | | | | | | | | As our parser rules are ordered by greediness, and as """str""" and '''str''' long string forms partially match the shorter string literal forms, we mistakenly parse these as an empty string (e.g. "" or '') followed by "garbage". We should set long string literal forms first here, so these are tried before the short string forms. Fixes handling of long strings all through the query language.
* Merge branch 'wip/carlosg/fix-coverage-percentage' into 'master'Carlos Garnacho2022-03-271-0/+1
|\ | | | | | | | | ci: Rebuild tree before running tests See merge request GNOME/tracker!500
| * ci: Rebuild tree before running testsCarlos Garnacho2022-03-271-0/+1
|/ | | | | | | | | | | For some reason, gcc or gcovr do not appreciate intermediate gcda/gcno files being transferred between CI runners. Ensure to rebuild the tree so that these are freshly created. Fixes the wonky coverage reports seen lately, as individual test runs had these fluctuations that made them report as little as 10% covered, quite far from the more accurate ~77% we get in the correct runs.
* Merge branch 'macos-test-fix' into 'master'Carlos Garnacho2022-03-271-1/+1
|\ | | | | | | | | tests: Fix libtracker-sparql/tracker-serialize-test on macOS See merge request GNOME/tracker!502
| * tests: Fix libtracker-sparql/tracker-serialize-test on macOSDaniele Nicolodi2022-03-261-1/+1
|/ | | | | | echo -n is not portable and most notably it is not implemented by the bultin echo in the old version of bash used to implement /bin/sh on macOS. Use printf to supprtess the newline character.
* Merge branch 'so-vs-dylib' into 'master'Carlos Garnacho2022-03-211-0/+2
|\ | | | | | | | | | | | | libtracker-sparql: Use .so suffix for modules on all platforms Closes #357 See merge request GNOME/tracker!499
| * libtracker-sparql: Use .so suffix for modules on all platformsDaniele Nicolodi2022-03-211-0/+2
|/ | | | | | | | | This is what GModule expects on Unix-like systems, including macOS. However, meson uses the .dylib suffix by default in the latter case. The current build definition would not work on Windows, but there are many other things that would be required to port Tracker there. Fixes: #357.
* Release 3.3.03.3.0Carlos Garnacho2022-03-192-1/+6
|
* Merge branch 'wip/carlosg/lost-subseconds' into 'master'Carlos Garnacho2022-03-161-3/+12
|\ | | | | | | | | libtracker-common: Do not miss subsecond info printing iso8601 dates See merge request GNOME/tracker!496
| * libtracker-common: Do not miss subsecond info printing iso8601 datesCarlos Garnacho2022-03-141-3/+12
|/ | | | | | | | | | | | | | We used %T as a shortcut to print times, but that translates to %H:%M:%S and misses subsecond information. To avoid that, check whether the passed GDateTime contains subsecond information and resort to %H:%M:%S.%f in that case. Since we prefer shorter iso8601 strings for storage purposes, combine this handling with the existing paths for timezone information, so iso8601 strings that don't need either can cut down those extra chars. Fixes subsecond information being lost on database inserts, and possibly other date comparison/printing misbehaviors.
* Merge branch 'wip/carlosg/more-tests' into 'master'Sam Thursfield2022-03-13105-12/+774
|\ | | | | | | | | Add more tests See merge request GNOME/tracker!495
| * tests: Add more tests for TrackerSparqlCursor APICarlos Garnacho2022-03-131-0/+84
| | | | | | | | Add tests for column names, and value types.
| * tests: Add more thorough portal testsCarlos Garnacho2022-03-131-6/+318
| | | | | | | | | | Test all corners in graph lookups, and whether visibility changes accordingly with graph modifications.
| * tests: Add 3-way alternative path testCarlos Garnacho2022-03-133-0/+22
| |
| * tests: Add more aggregate function testsCarlos Garnacho2022-03-1315-0/+61
| |