Skip to content

perf(index): catch up an index kept open, and land through it - #117

Merged
PiquelChips merged 1 commit into
feat/server-api-contractsfrom
feat/server-index-refresh
Nov 24, 2026
Merged

PiquelChips merged 1 commit into
feat/server-api-contractsfrom
feat/server-index-refresh

Conversation

@PiquelChips

Copy link
Copy Markdown
Member

A server keeps running, so it can keep the record index open between calls instead of reading it whole each time, which costs a lot in a big repository. Commands also read the index several times: once for the working copy, then again for each conflict lookup and landing.

  • Index::refresh catches an open index up from the op log, reading only the entries since its last catch-up, and reads the index again if the op log no longer has them.
  • The landing queue finds statements through the caller's Annotations, caught up once it holds the target's lock, so a caller that keeps one open doesn't read it again.
  • The workspace commands pass the index they read to their conflict lookups and landings.

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 59 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: e247039b-237f-4c91-bf81-c481616bc80a
Commits

Reviewing files that changed from the base of the PR and between a5c5917 and c415216.

Files selected for processing: 14

  • apps/origin-src/benches/land.rs
  • apps/origin-src/src/annotations/mod.rs
  • apps/origin-src/src/index.rs
  • apps/origin-src/src/queue/mod.rs
  • apps/origin-src/src/queue/session.rs
  • apps/origin-src/src/queue/tests/changes.rs
  • apps/origin-src/src/queue/tests/conflicts.rs
  • apps/origin-src/src/queue/tests/mod.rs
  • apps/origin-src/src/queue/tests/policy.rs
  • apps/origin-src/src/queue/tests/targets.rs
  • apps/origin-src/src/workspace/land.rs
  • apps/origin-src/src/workspace/mod.rs
  • apps/origin-src/src/workspace/ops.rs
  • apps/origin-src/src/workspace/registry.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/server-index-refresh branch 8 times, most recently from 946fac7 to 3f7b122 Compare November 23, 2026 21:39
A server keeps running, so it can keep the record index open between
calls instead of reading it whole each time, which costs a lot in a big
repository. A command also read the index several times: once for its
working copy, then again for each conflict lookup and landing.

`Index::refresh` catches an open index up with the op log, reading only
the entries since its last catch-up, as `Index::open` does, and reads the
index again if the op log no longer has them. The landing queue now
finds statements through the caller's `Annotations`, caught up once it
holds the target's lock, so a caller that keeps one open doesn't read
it again. `Annotations::into_index` hands the index back for the next
use, and the workspace commands pass the index they read to their
conflict lookups and landings.
@PiquelChips
PiquelChips force-pushed the feat/server-index-refresh branch from 3f7b122 to c415216 Compare November 23, 2026 22:51
@PiquelChips
PiquelChips merged commit 0ae43ef into main Nov 24, 2026
6 checks passed
@PiquelChips
PiquelChips deleted the feat/server-index-refresh branch November 24, 2026 22:46
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