Skip to content

Test that a full rebuild and incremental builds produce the same index #2335

Open

Description

@bplatz

A full rebuild and an incremental build are two implementations of the same index, and they have drifted apart at least four times, each found on its own:

#2150 (OPTIONAL binds nothing for some subjects on an incrementally built index; a reindex makes it right) may be the same shape.

Each of these would have shown up in one test: index the same commits both ways and compare the results.

Proposal

Commit a fixed set of transactions, then index them two ways:

  1. one full rebuild at the head (rebuild_index_from_commits);
  2. a full rebuild at an early t, then incremental builds over the rest with no rebuild fallback (build_incremental_index_for_record), at more than one window size.

Then compare the two roots by value, not by CID or id, since leaf boundaries and id assignment can legitimately differ:

  • each order's rows, decoded to IRIs and values, per graph;
  • dictionaries, by IRI and string;
  • stats (per-predicate, per-class, datatype counts);
  • each arena: numbig, vectors, spatial (cell entries by subject IRI and WKT), fulltext.

The data should cover every arena kind, retractions (including a fully retracted partition), named graphs, and a geometry that's edited across the incremental windows.

Suggested in the #2274 review.

Activity

  1. added
    enhancement
    P2
    area:storage
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2area:storageenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions