Skip to content

Idea: keep searching the old list while a rebuild runs, instead of pausing for all of it #923

Description

@chchatzop

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions