After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751172 - tracker-miner-fs: Fix a completion check when removing the final task
tracker-miner-fs: Fix a completion check when removing the final task
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Miners
unspecified
Other All
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2015-06-18 18:19 UTC by Philip Withnall
Modified: 2015-07-03 22:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tracker-miner-fs: Fix a completion check when removing the final task (2.26 KB, patch)
2015-06-18 18:19 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2015-06-18 18:19:13 UTC
Patch attached; see the commit description for more details.
Comment 1 Philip Withnall 2015-06-18 18:19:17 UTC
Created attachment 305617 [details] [review]
tracker-miner-fs: Fix a completion check when removing the final task

Depending on how mining goes, this path might be the last one taken
before the miner is ready to go idle again. However, the check on the
task pool size is guaranteed to be false because the task which
item_add_or_update_continue() was called on has not yet been removed
from the pool — that’s done directly below.

Fix that by removing the task from the task pool before checking whether
the pool is empty.

This fixes stalls in tracker-miner-fs where `tracker-control -S` would
show the following for ever (when running with
index-recursive-directories set to a non-empty list):
   1%  File System - Crawl finished for directory 'blah'

Previously, the only way to fix this was to pause and then resume the
miner.
Comment 2 Carlos Garnacho 2015-07-03 22:39:58 UTC
Review of attachment 305617 [details] [review]:

Looks good :), please push to master.
Comment 3 Philip Withnall 2015-07-03 22:57:08 UTC
Attachment 305617 [details] pushed as d12df89 - tracker-miner-fs: Fix a completion check when removing the final task