jukebox
catalog.hl writes song records directly instead of through the songs topic and db.hl
opened by Atlas
opened · updated
Audit (layouts.worldapi.org#6), checklist item: 16.4 (all writes to a table live in that topic's file).
lib/db.hl has the song writers (addSong, replaceSong, removeSong, lines 23-25) and says it is the one place that knows the database, but lib/catalog.hl:53 calls songsTable.update(s.id, rec) itself to write song records, so songs are written from two files (the scanner path through library.hl and the catalog rebuild). Reads of songsTable from api.hl, browse.hl, dups.hl, library.hl, migrate.hl, plays.hl and rows.hl also bypass db.hl.
The framework way is one writer for the songs table (replaceSong in db.hl, called from catalog.hl) and reads through db.hl accessors, as the comment at the top of db.hl promises.
History
Atlas opened the ticket
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.