Repository navigation
feat(pagebroker): implement the PVC artifact-storage backend - #496
Merged
oleg-kushniriov merged 0 commit intoOct 8, 2026
Merged
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
oleg-kushniriov
added this pull request to stack #473
October 7, 2026 14:15
oleg-kushniriov
force-pushed
the
feat/pvc-storage-backend
branch
2 times, most recently
from
October 8, 2026 09:15
41502de to
f9f61b6
Compare
oleg-kushniriov
force-pushed
the
feat/pvc-storage-backend
branch
from
October 8, 2026 09:44
f9f61b6 to
9e995c2
Compare
6 of 7 tasks
oleg-kushniriov
force-pushed
the
feat/pvc-storage-backend
branch
from
October 8, 2026 11:00
9e995c2 to
72efcfe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by #508 for review. The backend branch was moved below #493 in the stack. Pushing that reorder before updating PR bases caused GitHub to mark this PR merged into the lifecycle branch; it did not merge the backend into
main. #508 preserves the same backend branch and reviews it against #492.What this PR does / why we need it
Implements the PageBroker C++ artifact-storage backend (plan item 04-C) — the last piece needed before the artifact-addressed PVC flow (
#474,#475,#492,#493) can run end-to-end. Until nowValidateStagedCheckpoint/ValidateStagedRestore/kGetArtifactMetadataall threw/failed "not implemented"; this PR replaces those with real dispatch.identity.cpp: C++ComputeStoreID/ComputeCommitIDwith a self-contained SHA-256 (no new system dependency), matchingapi/storage/identity.go's length-prefixed preimage encoding exactly.identity_test.cppchecks it against the same shared vectors the Go side uses (api/storage/testdata/identity.json, already copied intotestdata/storage-contract/).artifact_store.cpp:PVCArtifactStorepublishes checkpoints into the existingartifacts/<contentUID>/containers/<name>/layout — not a new on-disk scheme, so#474's maintenance and legacy restore are unchanged. Writes apublication.jsonevidence sidecar (store ID, artifact handle, deterministic commitID) next tomanifest.yaml. Resolves and verifies that evidence for restore/metadata fetch, mapping failures toSTORE_MISMATCH,ARTIFACT_NOT_FOUND,ARTIFACT_CORRUPT,UNSUPPORTED_ARTIFACTinstead of collapsing everything intoSTORAGE_ERROR.broker.cpp/.hpp,checkpoint_transaction_descriptor.*: wires artifact dispatch intoPrepareCheckpoint/Restore/Commit, implementsGetArtifactMetadata.main.cpp/daemon.*: parses the sidecar's--storage-configargument (already added by#492) and resolves the configured store at startup.storage_config.cppis a minimal parser for exactly that fixed YAML shape, not a general YAML dependency added for four string fields.docs/operations/storage.md: updated to describe real activation instead of "not yet enabled," and corrected the transaction-lifetime language to match#474's fixed-constant decision (PageBroker's 2h05m lifetime is a constant now, not configuration).Which issue(s) this PR addresses
Part of #237.
How was this tested?
No C++ toolchain is available in the environment this was developed in for the real Linux build, but a local
protoc/clang++/brew-installedprotobuf/abseil/googletestwere enough to genuinely build and run the full test suite (not just syntax-check):BrokerTest/StorageContracttests unmodified and still green, plus newIdentity(exact match against the Go vectors),ArtifactStoreTest(publish/resolve/stage round-trips, atomic-replace, symlink/corruption/mismatch rejection),StorageConfig, andArtifactBrokerTest(full checkpoint→commit→restore and metadata-fetch flows throughHandleRequest).PublishCheckpointusedfs::renamefrom tmpfs staging into the PVC, which fails withEXDEVin production since they're different filesystems — fixed to copy, matching how the legacyPosixCopyEnginealready does it.MetadataFailsInvalidRequestWithoutCreatingTransactionWhenNoStoreIsConfigured) since it asserted the old hardcoded "not implemented" message./var→/private/varsymlink quirk infs::temp_directory_path(), reproduced identically against the untouched pristine code — confirmed not a regression and irrelevant to the real Linux CI build.Special notes for your reviewer
Base is
test/pvc-pagebroker-lifecycle, not#475/feat/pvc-checkpointas the implementation plan originally decided (2026-10-06):#492/#493were opened directly on#475ahead of this PR, and#492already added the sidecar's--storage-configchart argument that was this PR's own scoped startup-configuration task. Basing here instead avoids reproducing and conflicting with that hunk; see the plan doc's 2026-10-07 update for the full reasoning.Deliberately not in this PR:
recover-metadata" trigger (#474'sRepairPublicationis wired to a real work-item mode as of its 2026-10-07 fix, but nothing yet calls it — needs a product decision about the detection signal, not just this backend).#265) and anything S3 — out of scope per the plan.Does this PR introduce an API change?
🤖 Generated with Claude Code