Problem
attributeDescriptor?.restartNumber < workerData?.restartNumber (resources/databases.ts:1295 and :1304) appears to be dead code. attribute.restartNumber is never assigned anywhere in the table-loading path, so the persisted attributeDescriptor.restartNumber is always undefined, and undefined < N is always false. The restart-based reindex trigger therefore never fires.
Two possibilities
- It is redundant with the adjacent
indexingPID !== process.pid crash-recovery check → remove it to reduce confusion; or
- A
restartNumber was meant to be persisted on completion (e.g. in runIndexing's success path) and that write is missing → it is a latent bug and the trigger should be made to work.
Evidence
- Comparison sites:
resources/databases.ts:1295, :1304
- No assignment to the attribute descriptor:
grep '\.restartNumber =' resources/databases.ts → none
Ask
Maintainer decision on which of the two it is, then either remove the dead clause or add the missing persistence.
Related: #1354
🤖 Generated with Claude Code
Problem
attributeDescriptor?.restartNumber < workerData?.restartNumber(resources/databases.ts:1295and:1304) appears to be dead code.attribute.restartNumberis never assigned anywhere in the table-loading path, so the persistedattributeDescriptor.restartNumberis alwaysundefined, andundefined < Nis alwaysfalse. The restart-based reindex trigger therefore never fires.Two possibilities
indexingPID !== process.pidcrash-recovery check → remove it to reduce confusion; orrestartNumberwas meant to be persisted on completion (e.g. inrunIndexing's success path) and that write is missing → it is a latent bug and the trigger should be made to work.Evidence
resources/databases.ts:1295,:1304grep '\.restartNumber =' resources/databases.ts→ noneAsk
Maintainer decision on which of the two it is, then either remove the dead clause or add the missing persistence.
Related: #1354
🤖 Generated with Claude Code