Skip to content

search-engine: Explicitly close Tracker cursors

In the unlikely event of a cursor leak, implicitly relying on cursors being closed might turn somewhat worse than just a memory leak. E.g. this would also leak file descriptors, and these leaked descriptors result in the tracker-miner-fs-3 endpoint not noticing that these cursors are no longer being read from, thus avoiding their cancellation, and provoking more CPU activity than necessary on e.g. type to search.

Ensure to close cursors explicitly, so that these potentially nasty situations are completely avoided, and the hypothetical memory leak remains at just a memory leak.

Closes: #2557 (closed)

Merge request reports