Skip to content

fix(import): buffered creates break same-file lookup references #2806

Description

@yinlianghui

Baseline and relation to #2678/#2680

Minimal reproduction

Import into a real SQL self-referencing object:

Alice
Bob.manager = Alice
Carol.manager = Alice

Compare the same protocol with and without createManyData.

Expected / actual

  • Expected: prior rows in the same file are visible to later lookup resolution; both paths import 3/3 with the same semantics.
  • Actual: bulk path resolves Bob/Carol before Alice is flushed, caches the first not-found, and creates only Alice (1 created / 2 reference errors). Sequential compatibility path creates 3/3.

Reproduced 2/2 in the integration harness and again through the real showcase HTTP API (root succeeds, child reference fails).

Impact

Enabling the #2680 bulk capability changes import semantics for hierarchical and same-file relational data, causing deterministic row loss/errors in previously valid import order.

Evidence and exclusions

Required regression tests

  • Real-protocol same-file self-reference with bulk capability imports 3/3.
  • Result order, cache behavior, batching, and no-bulk compatibility remain covered.
  • Include progress-boundary cases so correctness does not depend on accidental flush cadence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions