Repository navigation
[Store] Add V6 object write generations, SSD task fencing, and HA durable retirement - #5791
Draft
MaskVulcan wants to merge 8 commits into
Draft
MaskVulcan wants to merge 8 commits into
MaskVulcan wants to merge 8 commits into
Conversation
This was referenced Nov 24, 2026
This was referenced Nov 25, 2026
MaskVulcan
force-pushed
the
ssd/pr5-v6-generation-and-ha
branch
2 times, most recently
from
November 25, 2026 21:14
cd3fcca to
572f683
Compare
This was referenced Nov 26, 2026
Signed-off-by: MaskVulcan <9528071+MaskVulcan@users.noreply.github.com>
Signed-off-by: MaskVulcan <9528071+MaskVulcan@users.noreply.github.com>
Add the length-delimited physical SSD storage-key codec (offload_storage_key.h) and forward/backward-compatible struct_pack::compatible generation/task fields on RPC and HA metadata payloads (LocalDiskDescriptor, Replica::Descriptor, ObjectMeta, GetReplicaListResponse, PromotionAllocStartResponse, OffloadTaskItem, PromotionTaskItem, StandbyObjectMetadata, MetadataPayload). Purely additive wire and codec foundation with zero runtime behavior change; includes round-trip codec and legacy-vs-new struct_pack serialization compatibility tests. Signed-off-by: MaskVulcan <9528071+MaskVulcan@users.noreply.github.com>
… offload Extend BucketStorageBackend and StorageBackendInterface with a BatchQuery hook, an UngroupedOffloadingObjects accessor, and an explicit flush_previous_carryover option so FileStorage can retain generation-scoped OffloadTaskItems across bucket grouping cycles without dropping tasks. Signed-off-by: MaskVulcan <9528071+MaskVulcan@users.noreply.github.com>
…urable retirement Implement the generation-scoped SSD recovery and HA retirement stage of RFC kvcache-ai#5768 on top of the compatible wire/codec foundation and prerequisites - Mint per-write generations on PutStart/UpsertStart and enforce matching captured grants on PutEnd/PutRevoke and batch/session variants. - Key SSD offload records with length-delimited generation storage keys, fence offload and promotion completion/failure notifications by object generation and task_id (allowing holder release of unallocated prefetch tasks), and prevent stale scans from resurrecting deleted/removed objects. - Wait for ordered OpLog durability and callback finalization before retiring overwritten/removed allocations in HA mode, bounded by oplog_durable_wait_timeout_ms. - Add docs/source/design/store/ssd-generations.md, unit/integration tests, and adapt existing tests to forward captured primary write grants. Signed-off-by: MaskVulcan <9528071+MaskVulcan@users.noreply.github.com>
…restore, and legacy fallback Signed-off-by: MaskVulcan <9528071+MaskVulcan@users.noreply.github.com>
MaskVulcan
force-pushed
the
ssd/pr5-v6-generation-and-ha
branch
from
November 26, 2026 05:23
572f683 to
4f6203f
Compare
…te metrics test - Update SsdPrefetcher::TriggerPrefetch() and RunLocalPrefetch() to resolve the active LOCAL_DISK replica's physical storage_key (falling back to the logical key for legacy masters) before calling FileStorage::LookupLocalObjectSize(), fixing SSD prefetch-on-exist and demand-kick promotion under V6 generation keys. - Update master_metrics_test.cpp to call WrappedMasterService::PutRevokeV2() / BatchPutRevokeV2() for ObjectMeta requests and initialize ObjectMeta::write_generation. Signed-off-by: MaskVulcan <9528071+MaskVulcan@users.noreply.github.com>
Resolve merge conflicts with kvcache-ai#5711 (bucket reclaim) in file_storage.cpp and file_storage_test.cpp, and make FileStorage::FindDeadKeys() and FileStorageReclaimTest V6 physical storage_key / generation-aware so live V6 buckets are preserved while removed or superseded generations are reclaimed. Signed-off-by: MaskVulcan <9528071+MaskVulcan@users.noreply.github.com>
This branch has not been deployed
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.
Part 5 of 5 in the SSD Offload series tracked in RFC #5768.
Summary
Adds object write-generation fencing and HA durability hardening for native SSD offload so stale offload/promotion tasks, same-key overwrites, local restarts, and HA failovers cannot resurrect deleted or overwritten data:
ordered_oplog_writer.*): separates durable log advancement from completion callback finalization so synchronous retirement waits for callbacks cleanly.storage_backend.*): publishes SSD bucket metadata via temp file +fsync+ atomic rename + directoryfsync, with failpoint restart tests.offload_storage_key.h,replica.h,object_metadata.h,rpc_types.h, HA standby/metadata structs): usesstruct_pack::compatiblefields so wire structs remain backwards-compatible while scoping physical SSD records by object generation.BatchQueryReadOnlyhook (storage_backend.*,file_storage.*,client_service.*): retains ungrouped partial offload batches cleanly across heartbeats without losing pending task accounting on cancellation/wipe.master_service.*,file_storage.*,real_client.*,client_service.*,docs/source/design/store/ssd-generations.md): enforces generation authority on offload/promotion/eviction/restore, rejects resurrection ofREMOVEDreplicas, releases unallocatedfrom_prefetchslots on promotion failure under DRAM pressure, and documents the deployment/upgrade contract.Size & Scope
main, 75 files (+2604/-912prod,+7230/-1895tests,+91docs).Series Overview (RFC #5768)
tcp_proto_versioninSegmentDesc::operator==main)main)TransferEngine::submitReceiverVisibleWrite()&Status::ProtocolUnsupported(classic TCP v2 opt-in)main)io_uringworkersmain)FileStorage::ReadOwnerStreamingRealClient& Python_storemain)Local Validation
ssd_generation_codec_test,ssd_generation_master_test,storage_backend_test,file_storage_config_test,file_storage_promotion_test,master_service_ha_test,master_metrics_test,master_service_ssd_test,master_service_ssd_scenario_test,master_service_offload_scenario_test,prefetch_task_master_test,ranged_disk_lease_test,oplog_applier_test,oplog_batch_codec_test,oplog_batch_auditor_test,oplog_batch_standby_reader_test,oplog_batch_storage_test,oplog_types_test,batch_oplog_snapshot_codec_test,batch_oplog_snapshot_promotion_test(plus prior full V6 integration passes onpybind_client_test,client_integration_test,file_storage_test,master_service_test,promotion_on_hit_test, and Sphinx-W).clang-format 20.1.80 diff,typos 1.30.20 issues, DCO verified.