Skip to content

Read copy-bound rows once per load #1149

Open

Description

@kriszyp

Problem

When the origin-state epoch moves, a receiver's copy-bound load (loadPersistedCopyBounds in replication) scans [copyBound, *] three times:

  1. strict validation (readCopyBounds);
  2. the merged view;
  3. the committed view (readCommittedCopyBounds).

The rows number about one per copying peer, and loads skip while the epoch is unchanged, so the cost is small. One pass could validate and build both views.

Raised by the cross-model review on harper-pro#1092.

Review-Deferral: 883b1a28329204b4 severity=nit category=performance

Core's checkpoint read (readCopyBounds, readOriginStates) also allocates its range options and a closure per call; same once-per-capture cadence.
Review-Deferral: 792157686c563d60 severity=nit category=performance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    P3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions