Skip to content

direct: Prune only content of correctly finished batches

Commit 94498832 attempted made finished batches cheap to keep in memory, for languages where we don't have full control of object lifetime (e.g. GJS).

This however broke tracker-miner-fs-3 handling of failures, since that tries to peek at TrackerResources that were already disposed by the TrackerBatch being cleared of content, in order to retry, or report for tracker3 status.

In order to fix that and keep the improvement for the common case (i.e. success), only clear the TrackerBatch contents if the operation finished successfully.

Fixes: 94498832 ("libtracker-sparql/direct: Prune content of already executed batches")

Merge request reports