Skip to content

Dead restartNumber reindex trigger in table loading (never fires) #1359

Description

@heskew

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

Activity

  1. added
    bugSomething isn't working
    area:searchVector search, HNSW, full-text search
    area:storageStorage engine, LMDB/RocksDB, compaction
    on Jun 17, 2026
  2. self-assigned this
    on Jun 17, 2026
  3. added a commit that references this issue on Jun 26, 2026
    0f0afca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:searchVector search, HNSW, full-text searcharea:storageStorage engine, LMDB/RocksDB, compactionbugSomething isn't working

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions