Skip to content

D-WAL-6: wire the version clock into LanceCycleWriter - #1567

Merged
AdaWorldAPI merged 3 commits into
mainfrom
ccr-9f3b8075-74u47l-version-clock
Oct 15, 2026
Merged

AdaWorldAPI merged 3 commits into
mainfrom
ccr-9f3b8075-74u47l-version-clock

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

VersionClock (#1562) had no writer. LanceCycleWriter now keeps one, following the clock's own contract.

What changes

  • Seeding on open and on bootstrap. The clock starts at the store's current version, with the row count taken from the physical row counts of the manifest the handle already holds. No extra reads. Versions before that point return None.
  • Recording after every commit. commit_cycle now wraps the old body (moved unchanged to commit_cycle_inner) and records the handle's version after every outcome: Committed, Reconciled, or an error after a reopen.
  • Deleted rows keep their positions. The clock counts physical rows, so a deleted row stays inside its range and the reader masks it.
  • Rows going back start a new clock. If the row count drops at a newer version, which a reordering rewrite can cause, a fresh clock starts at that version. A fragment without a physical row count leaves the writer with no clock.

Tests (red first, then green)

  1. On a store this writer created, the clock equals storage at every version.
  2. A reopened writer starts its clock at the head and returns None before it; the next commit is recorded correctly.
  3. After a delete, the clock counts positions, not live rows, and the next append's range matches storage.
  4. A reconciled append (the acknowledgement was lost) keeps the clock equal to storage.

Disable runs, each red: no sync after commit (4 of 4 tests fail), counting live rows instead of positions (test 3 fails), starting a new clock on every sync (test 1 fails).

cargo test -p lance-graph --lib cycle_sink passes 28 of 28, and cargo clippy -p lance-graph --lib --tests -D warnings is clean.

Open

  • No reader uses the clock yet.

🤖 Generated with Claude Code

https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh


Generated by Claude Code

…None)

Clock equals storage at every version on a store the writer created; a
reopened writer seeds at the head and answers None before it, as the
VersionClock contract (#1562) says; deleted rows keep their positions;
the reconciled append keeps the clock equal to storage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
The clock is seeded at the store's head on open (and on bootstrap) from the
physical row counts in the held manifest, then recorded after every commit
outcome. Deleted rows keep their positions; a version whose rows went back
starts a new clock. No reads beyond the manifest the handle holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011BMJnDBAfzcuQh5HeT39Rh
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6bdf1e0b-c66e-40b0-acd9-4c52d9c9849d
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

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

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 15, 2026 21:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T21:20:31.746202Z 6ced788 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AdaWorldAPI
AdaWorldAPI merged commit b1f1365 into main Oct 15, 2026
13 checks passed
AdaWorldAPI added a commit that referenced this pull request Oct 15, 2026
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.

2 participants