Skip to content

Persist: Add new API for run based spine replacement #33044

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DAlperin
Copy link
Member

Motivation

Tips for reviewer

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@DAlperin DAlperin requested a review from a team as a code owner July 15, 2025 21:08
DAlperin added a commit that referenced this pull request Jul 15, 2025
@DAlperin DAlperin requested a review from Copilot July 16, 2025 20:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new API for run-based spine replacement in the persist client, extending the existing merge resolution functionality to support fine-grained replacement of specific runs within hollow batches rather than just entire batches.

  • Adds RunLocation struct to identify specific runs within hollow batches using SpineId and RunId pairs
  • Introduces a new apply_merge_res_checked method that can replace individual runs within batches
  • Extends FueledMergeRes with inputs and new_active_compaction fields to support the new replacement logic

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/persist-client/src/internal/trace.rs Core implementation of run-based spine replacement with new data structures and methods
src/persist-client/src/internal/state_serde.json Test data updates reflecting the new run-based structure
src/persist-client/src/internal/state_diff.rs Updates to populate new fields in FueledMergeRes
src/persist-client/src/internal/state.rs Test utilities and method renaming for compatibility
src/persist-client/src/internal/machine.rs Updates to construct FueledMergeRes with new fields
src/persist-client/src/internal/compact.rs Updates to construct FueledMergeRes with new fields
src/persist-client/src/cli/admin.rs Updates to construct FueledMergeRes with new fields

} else {
ApplyMergeResult::NotAppliedNoMatch
}
}

#[allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really dead!

DAlperin added a commit to DAlperin/materialize that referenced this pull request Jul 17, 2025
DAlperin added a commit to DAlperin/materialize that referenced this pull request Jul 17, 2025
DAlperin added a commit to DAlperin/materialize that referenced this pull request Jul 17, 2025
@DAlperin DAlperin force-pushed the dov/run-based-spine-replacement branch from f035a90 to 23e21c8 Compare July 17, 2025 02:52
DAlperin added a commit that referenced this pull request Jul 17, 2025
@DAlperin DAlperin force-pushed the dov/run-based-spine-replacement branch from 23e21c8 to f497c4a Compare July 17, 2025 14:26
DAlperin added a commit that referenced this pull request Jul 17, 2025
DAlperin added a commit that referenced this pull request Jul 17, 2025
@DAlperin DAlperin force-pushed the dov/run-based-spine-replacement branch from f497c4a to ae7312a Compare July 17, 2025 14:39
DAlperin added a commit that referenced this pull request Jul 17, 2025
@DAlperin DAlperin force-pushed the dov/run-based-spine-replacement branch from ae7312a to 2bb9775 Compare July 17, 2025 15:08
DAlperin added a commit that referenced this pull request Jul 17, 2025
@DAlperin DAlperin force-pushed the dov/run-based-spine-replacement branch from 2bb9775 to a15c651 Compare July 17, 2025 15:11
DAlperin added a commit that referenced this pull request Jul 17, 2025
@DAlperin DAlperin force-pushed the dov/run-based-spine-replacement branch from a15c651 to 85910d2 Compare July 17, 2025 15:21
DAlperin added a commit that referenced this pull request Jul 21, 2025
@DAlperin DAlperin force-pushed the dov/run-based-spine-replacement branch from 85910d2 to 0274b1f Compare July 21, 2025 15:17
DAlperin added a commit that referenced this pull request Jul 21, 2025
@DAlperin DAlperin force-pushed the dov/run-based-spine-replacement branch from 0274b1f to ee85994 Compare July 21, 2025 20:09
DAlperin added a commit that referenced this pull request Jul 21, 2025
@DAlperin DAlperin force-pushed the dov/run-based-spine-replacement branch from ee85994 to 3c38325 Compare July 21, 2025 20:53
DAlperin added a commit that referenced this pull request Jul 21, 2025
@DAlperin DAlperin force-pushed the dov/run-based-spine-replacement branch from 3c38325 to a97ff26 Compare July 21, 2025 20:55
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