Bug 5990 - Disk access continues after full scan is complete
: Disk access continues after full scan is complete
Status: RESOLVED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.0
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-31 17:56 UTC by Philip Meyer
Modified: 2007-11-07 14:36 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Meyer 2007-10-31 17:56:27 UTC
I started a full rescan of my music library.

After the WebUI reported that the scan was complete, I noticed that my server was still accessing the disk.  perl.exe was using ~20% CPU.

I suspect that this is due to plugins that do some processing when a scan is complete.  However, shouldn't the rescan progress indication include plugin processing that happens as part of rescan events?  For example a "plugin post-processing" progress bar(s).

At the moment, users may believe that rescan processing has completed and try to stream music, whilst unknowingly processing is still occuring.

It should not be possible to initiate another scan whilst a scan is in progress either - could things go badly wrong if another scan is started whilst post-scan processing is still running?
Comment 1 Philip Meyer 2007-10-31 18:21:04 UTC
I have now completed a full rescan followed by a rescan for new and changed files.

I have not been able to repeat this problem so far.  Perhaps it was another effect of bug 5964, where the last stage of a rescan didn't seem to complete properly?
Comment 2 KDF 2007-10-31 19:36:56 UTC
I suspect its something like lazy search.  plugins like this that launch third party tasks post-scan are outside of the scope of the scanner, but will generate activity per the requirements of the plugin in question.

Please feel free to investigate and report back.
Comment 3 Erland Isaksson 2007-11-01 04:48:13 UTC
(In reply to comment #2)
> I suspect its something like lazy search.  plugins like this that launch third
> party tasks post-scan are outside of the scope of the scanner, but will
> generate activity per the requirements of the plugin in question.
> 
> Please feel free to investigate and report back.
> 

What we really need here is some way for third party plugins to hook into to end of the scanning process. This is something that would be good not only for the Lazy Search plugin but also for some of my plugins, especially the Custom Scan plugin. This would not only solve the issue with the scanning being marked completed to soon, it would also make SqueezeCenter usable during the time these third party plugins run. Today these plugin execute tasks with Slim::Utils::Scheduler::add_task which runs in the main SqueezeCenter process and not inside the scanning process.

Today the only option these plugins have is to subscribe on the "rescan done" event, but this is sent after the scanning has been marked as completed.
Comment 4 Chris Owens 2007-11-07 10:35:27 UTC
Dean suggests starting a discussion on the developer list to discuss this kind of change to the plugin architecture.
Comment 5 Erland Isaksson 2007-11-07 14:36:03 UTC
(In reply to comment #4)
> Dean suggests starting a discussion on the developer list to discuss this kind
> of change to the plugin architecture.
> 

I've started a new thread regarding this in the developers forum:
http://forums.slimdevices.com/showthread.php?t=40038

There is also an enhancement request that describes this in more detail:
https://bugs-archive.lyrion.org/show_bug.cgi?id=6023