Skip to content

feat(targets): append several acceptances at once - #126

Open
PiquelChips wants to merge 1 commit into
feat/sync-conditional-putfrom
feat/sync-append-all
Open

PiquelChips wants to merge 1 commit into
feat/sync-conditional-putfrom
feat/sync-append-all

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

A fetch brings a target's new acceptances as one chain. Appending them one at a time would sync the log and the head once per acceptance.

  • Store::append_all appends a run of acceptances in one compare-and-swap: the first must follow the target's latest, each the one before it.
  • The records the acceptances rely on, such as a landing's promoted statements, go in the same batch, so the landing queue uses it too and saves a sync.
  • The op log still says the target advanced to each acceptance, even one the store held before (say, fetched as another target's landing). A repair after a crash publishes every entry left unpublished, not just the last.
  • A target is named before its first head. Store::name_target also lets a store name targets it doesn't follow, so acceptances of them it holds can be described.

Note

Written by Claude Opus 5.5 in Claude Code (via T3 Code)

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e656d3e2-aac4-49c5-9ac4-963e6f83ecef
Commits

Reviewing files that changed from the base of the PR and between a706f08 and 80d23c2.

Files selected for processing: 2

  • apps/origin-src/src/queue/session.rs
  • apps/origin-src/src/targets.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@PiquelChips
PiquelChips added this pull request to stack #165 November 22, 2026 14:59
@PiquelChips
PiquelChips force-pushed the feat/sync-append-all branch 3 times, most recently from 83693fd to a40bffb Compare November 22, 2026 18:54
A fetch brings a target's new acceptances as one chain, and syncing each
on its own would cost a sync of the log and of the head per acceptance.
`Store::append_all` appends a run of acceptances in one compare-and-swap:
the first must follow the target's latest, each the one before it. The
records they rely on, such as a landing's promoted statements, are
written in the same batch as the acceptances, so the landing queue uses
it too and saves a sync.

The op log still says the target advanced to each acceptance, even one
the store held before, such as one fetched as another target's landing,
and a repair after a crash publishes every entry left unpublished, not
only the last. A target is named before its first head, by
`Store::name_target`, which also lets a store name targets it doesn't
follow, so acceptances of them it holds can be described.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant