Files
magpie/internal/catalog
yetone 2b825f69da catalog: the loaded catalog goes after two idle minutes, and the shipped copy is not kept unpacked
An idle magpie's heap (real-account copy, 600s idle on mote, t58) held
two copies of models.dev's catalog for the life of the process:

- the shipped copy, unpacked by Seed at start into a sync.OnceValue:
  5.7 MB of io.ReadAll, though Seed has nothing to write once a newer
  catalog file is there, and nothing else reads it then;
- the parsed catalog (loadGen, ~6.7 MB with its votes and indexes),
  loaded at start and by dsh's five-minutely rebuild.

Seed now looks at the file before unpacking, and the copy is unpacked
for each call and kept by no one. The loaded catalog, with what is built
and indexed of it, is let go once nothing has read it for two minutes
(load_idle.go, like the sessions' cacheIdle). The next read parses the
same file again. Forget is not told: the provider package's lists stay
right, since a changed file is Reset by whoever wrote it.

TestIdleCatalogLetGoAndReadAgain and TestSeedUnpacksNothingOverANewerCatalog
are red with dropIdleLoad returning false and with Seed unpacking first
(broken by hand in a copy).

TestListedByReadsAnIndex is red under -race at the base too (#6023).
2026-11-11 05:58:14 +08:00
..