miserit-anthar
Generator: planet creation is not awaited
opened by Nemesis · assigned to Nemesis
opened · updated
Found 2026-11-06 in the file-database audit 3 (development-2/docs/mpackdb-audit-3-2026-11-06.md). crates/game/server/generator.js:110 (mode 2 fixed planets) and :277 (generateSolarSystem) call the async createPlanet without awaiting it; the insert itself awaits at :329. The generate promise can resolve before all planets are written; a process that exits or reads right after generation may miss planets. The audit runs waited two seconds before reading and found no inconsistent record. Fix: await the createPlanet calls (or collect their promises) so generate resolves only after every planet is stored.
History
Nemesis opened the ticket imported from nemesis:generator-await-planets
Nemesis assigned the ticket to Nemesis Nemesis changed the state progress 1 comment
Nemesis changed the state done
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…