Repository navigation
Implement writeFileUsingBlobWritingFunction for Multi-Location Disks - #127568
Conversation
|
Workflow [PR], commit [3d0fade] Summary: ✅
AI ReviewSummaryPR #127568 extends Missing context / blind spots
Findings
Tests
Final Verdict |
| local_object_storage->copyObjectToAnotherObjectStorage(object, object, read_settings, write_settings, *object_storages->takePointingTo(location)); | ||
| }); | ||
| } | ||
| runner.waitForAllToFinishAndRethrowFirstError(); |
There was a problem hiding this comment.
[P2] Roll back uploaded blobs when a replica copy fails
If one enabled destination rejects a copy after the local upload succeeds, this wait throws before the metadata operation below is registered. DiskObjectStorage::writeFileUsingBlobWritingFunction then exits before commit, and neither it nor the transaction destructor calls undo. The local blob and any successful replica copies are therefore left without metadata or a removal-queue entry, so failed/retried restores accumulate orphaned objects. Please drain the workers and roll back the uploaded blobs on this exception path, as the existing DiskObjectStorage::copyFile caller already does, and cover a failure on one destination.
|
|
||
| runner.enqueueAndKeepTrack([&, location] | ||
| { | ||
| local_object_storage->copyObjectToAnotherObjectStorage(object, object, read_settings, write_settings, *object_storages->takePointingTo(location)); |
There was a problem hiding this comment.
[P2] Handle S3 locations on independent endpoints
This new fan-out also reaches S3ObjectStorage::copyObjectToAnotherObjectStorage, whose S3 shortcut passes the destination client as both clients to copyS3File (S3ObjectStorage.cpp:667,681–685). For enabled locations on two independent MinIO endpoints, uploading bucket-a/key on A succeeds, but the subsequent copy asks endpoint B to copy B's nonexistent bucket-a/key; it never reads the object on A. NoSuchBucket/NoSuchKey propagates rather than selecting the buffered path. Consequently, RESTORE still fails for this multi-location configuration even though ordinary writeFile writes to both endpoints. Please explicitly select source-read/destination-write copying for independent services, and add coverage with two endpoints.
| object.bytes_size = std::move(write_blob_function)(blob_path, WriteMode::Rewrite, /*object_attributes=*/std::nullopt); | ||
|
|
||
| addOperation([object, mode](MetadataTransactionPtr tx) | ||
| LocationSet written_locations{local_location}; |
There was a problem hiding this comment.
[P2] Honor the local location's enabled flag before uploading
ClusterConfiguration treats local and enabled independently, and ordinary writeFile/copyFile write only to getEnabledLocations. With local A disabled and B enabled, this path nevertheless uploads to A before consulting the enabled locations, then unconditionally includes A in written_locations. If A was disabled because it cannot accept writes, RESTORE fails there even though the enabled destination is healthy. Please honor the enabled-location set for the initial upload too, including choosing the matching callback client/namespace, or explicitly enforce and document a requirement that the local location remain enabled before starting any upload.
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units439 translation units recompiled, 4069 s compile time in total, 439 of them have a recent master baseline. Median compile-time ratio to the baselines is ×1.07 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio. |
Backport #127568 to 26.8: Implement `writeFileUsingBlobWritingFunction` for Multi-Location Disks
Backport #127568 to 26.10: Implement `writeFileUsingBlobWritingFunction` for Multi-Location Disks
Backport #127568 to 26.9: Implement `writeFileUsingBlobWritingFunction` for Multi-Location Disks
…n` for Multi-Location Disks
…n` for Multi-Location Disks
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
This patch supports
writeFileUsingBlobWritingFunctionfor disks with multiple configured locations.Workflow [PR]
Sync PR [sync-upstream/pr/127568]
Version info
26.11.1.669-master(included in26.11and later)26.10.2.98,26.9.26.11,26.8.35.9