Raised by Neo on #914. PAUSE_ON_UPDATE refuses every @find and every file request for the whole !update: list.py's search gate and dcc.py's request gate both key off update_inprogress, for the full subprocess run. On a 64k-file NFS library that's about 80 s per rebuild, and more while audio info is being read for the first time.
But the new list is built under temporary names and swapped in only at the end (the atomic publish). Until the swap, the old list is complete, valid and still what is being handed out. So searching it, and serving requests from it, during the scan would be answering from exactly the list the users have. Only the swap itself, and whatever re-reads the list right after it, needs a pause.
Questions to settle before any code:
- Is there anything a request during the scan could get wrong? A file that is removed from disk mid-rebuild is refused as today, since the path is checked at request time.
- Does
PAUSE_ON_UPDATE keep a meaning, e.g. "pause for the swap only" by default and "pause for the whole rebuild" as the old behaviour, or does it go?
- What about the rebuild's own reads of the list files (the side files, the zip) against a search reading the same files?
Recorded for a decision, not claimed.
Raised by Neo on #914.
PAUSE_ON_UPDATErefuses every@findand every file request for the whole!update:list.py's search gate anddcc.py's request gate both key offupdate_inprogress, for the full subprocess run. On a 64k-file NFS library that's about 80 s per rebuild, and more while audio info is being read for the first time.But the new list is built under temporary names and swapped in only at the end (the atomic publish). Until the swap, the old list is complete, valid and still what is being handed out. So searching it, and serving requests from it, during the scan would be answering from exactly the list the users have. Only the swap itself, and whatever re-reads the list right after it, needs a pause.
Questions to settle before any code:
PAUSE_ON_UPDATEkeep a meaning, e.g. "pause for the swap only" by default and "pause for the whole rebuild" as the old behaviour, or does it go?Recorded for a decision, not claimed.