Main moved the test that checks the SSE-KMS summary on an audit entry
from `rustfs/src/storage/helper.rs` to `rustfs/src/app/owned_audit_test.rs`.
Two conflicts follow from that move.
`rustfs/src/storage/helper.rs` takes main's side: the test is gone from
this file.
`rustfs/src/app/object/mod.rs` keeps main's split of the SSE imports and
adds the two extension traits this branch introduced. On this branch
`SseKmsPrincipal::from_request` is reached through `SseKmsPrincipalExt`,
so the moved test imports the trait and the test-only re-export carries
it.
Replace the copy request-head fixture's from_s3s call with
RequestEnvelope::from_parts, keeping method, URI, headers,
extensions, region, service, and credentials. The request-head
parity assertions are unchanged.
Replace the presigned checksum fixtures' from_s3s calls with
RequestEnvelope::from_parts, keeping method, URI, headers, and
extensions. Credentials stay absent. The checksum, ambiguous-value,
header, and verified-presign assertions are unchanged.
MP-03 recorded the extra `x-amz-server-side-encryption: AES256` header on
SSE-C CreateMultipartUpload and CompleteMultipartUpload responses as a
known deviation. The header is gone on main, so the case now checks the
intended headers directly; left as a marker it would report the deviation
as fixed and fail the run.
On both builds the base and this branch pass the case.
Replace the ListObjectsV2 seam's from_s3s call with
RequestEnvelope::from_parts, keeping method, URI, headers,
extensions, region, service, and credentials. The list output
mapping and migration header are unchanged.
Replace the ciphertext-replication and KMS create fixtures'
from_s3s calls with RequestEnvelope::from_parts, keeping method,
URI, headers, and extensions. Credentials stay absent. The refusal,
authorizer, and upload-id assertions are unchanged.
Replace the five test-only RequestEnvelope::from_s3s calls with
RequestEnvelope::from_parts, keeping method, URI, headers, and extensions.
Credentials, region, and service stay absent. Production S3Router::call
still uses from_s3s.
Replace the two RequestEnvelope::from_s3s calls in the stale-incarnation
fixture with RequestEnvelope::from_parts, keeping method GET, URI
/missing, empty headers, and empty extensions.
Replace build_request_with_req_info plus from_s3s in the CreateBucket
and DeleteBucket fixture with RequestEnvelope::from_parts, keeping
method PUT, URI /, empty headers, and the ReqInfo extension.
Replace build_request plus from_s3s in the create-multipart generation
fixture with RequestEnvelope::from_parts, keeping the method, URI, and
server-context extension.
Replace build_request plus from_s3s in the lifecycle, replication,
public-access-block, and shared config-delete fixtures with
RequestEnvelope::from_parts, keeping the method, URI, and extensions.
Replace build_request plus from_s3s in the logging, tagging, website,
object-lock, and notification fixtures with RequestEnvelope::from_parts,
keeping the method, URI, and extensions.
Three groups of cases are added to the black-box suite, with what they
need to run.
Run-time state (14 cases). A write follows the state the process is in
now, a read follows what the object recorded: the master key across
restarts, KMS stopped, started and configured at run time, a deployment
moving between key sources, a changed backend, and keys disabled,
destroyed and rotated. New configurations: Local KMS with a master key,
Vault Transit, Vault KV2 and the Static backend. Vault is a development
server started by the driver with a token generated per run; when it
cannot be started its cases report an environment error.
Authorization and leaks (18 cases). Per-key authorization on bucket
defaults, both ends of a copy, multipart uploads, every read entry point,
anonymous access, internal work and audit entries. Every exchange of a
run is archived with secrets redacted, and four checks over the whole run
look for key material in responses and server logs, for internal headers,
and for unexpected internal-error messages.
Stored form (8 cases). What an encrypted object looks like on disk is
read with the repository's `dump_fileinfo` tool and held to one manifest
per build: every metadata key with its exact value or, for random values,
its shape. The cases also search the drives for plaintext, customer keys
and unwrapped data keys. `cross` records the stored form of everything
the writer stored.
Compared with the base on the default build, all levels: 382 verdicts and
887 exchanges equal, no blocking difference; 86 case runs pass on each
side. Three cases report a known deviation that predates this branch: the
multipart SSE-C response header (MP-03), an SSE-KMS write that turns from
400 into 503 after a refused KMS start (KS-09), and a read by a caller
without a grant that reveals whether the key was destroyed or KMS is
stopped (SEC-05). The manifests were written from the base binaries and
the branch stores the same form in both builds.
Each group was shown to fail when it should: Vault unavailable gives
environment errors, the two authorization configurations swapped fail the
matrix both ways, a planted key is found in a log and in a response, a
`rio-v2` binary registered as the default build fails the manifest and
the build check.
The suite could only run P0 cases on six built-in configurations with one
shared site each. The next groups of cases need more than that:
- `run --level p0|p1|all`, and a `skip` verdict for a case the backend's
capability table rules out.
- `register_config` lets a case module add a process configuration with
what it needs before the process starts, once it answers, and at the
end of the run. The two Local KMS configurations now use the same
mechanism instead of special cases in the driver.
- `isolated` cases get a site of their own on a fresh data directory and
may restart it with another configuration or environment.
- Exchange hooks and post-run checks, for modules that keep everything a
run saw and judge it as a whole.
- Case modules are discovered by file name, and the binary registry can
be shared between state directories.
The P0 results and the comparison with the base are unchanged.
One conflict, in a test in `rustfs/src/storage/helper.rs`: main now builds
the SSE-KMS principal straight from the request, and this branch reaches
`from_request` through the `SseKmsPrincipalExt` trait. The merged test
keeps the trait import and passes the request directly.
* fix(heal): create tmp source dir when healing transitioned objects
* Skip local shard cleanup when transitioned metadata has no data directory
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
* perf(ecstore): reduce allocations for bounded bitrot frames
* test(s3): cover dynamic block layouts over HTTP
* perf: measure quantized range read shape
* chore: checkpoint quantized read metrics draft
Save work in progress for collaboration. Counts omit retired readers and transient or cancelled hedges. Frame semantics, async recorder coverage and disabled-metrics overhead remain unresolved; these counters are not ready for performance conclusions.
Validation: rustfmt and ecstore check passed; io-metrics 120, quantized 4 and hashed-read 3 tests passed. No new live or performance validation.
* perf(ecstore): reduce dynamic layout read overhead
* fix(ecstore): avoid prefetching conservative short range tails
* perf(ecstore): compact deferred shard reader state
* perf(ecstore): include shard checksums in file buffer cap
* fix(ecstore): preserve bounded quantum frames during heal
* perf(ecstore): reuse owned quantized frame batches
* perf(ecstore): batch q reads and retain shared copy framing
* fix(ecstore): preserve typed quantized read errors
* perf(ecstore): avoid zero-fill and serial copies in local batch reads
The local batch reader zero-initialized every window at a nonzero offset
before reading it, and copied every shard serially inside one blocking
task. Two-segment q-window range reads (cross-shard, cross-block) pay
both costs twice per request.
Read each window with a positioned read into uninitialized Vec capacity,
and dispatch each shard separately when every window is at least 512 KiB,
where copies dominate blocking-pool round trips. Smaller windows keep one
coalesced dispatch.
* perf(ecstore): keep readahead pipelined for local batch windows
A single window-sized pread on cold pages waits on each kernel readahead
chunk in turn. Seek to the window start and fill the buffer with
read_to_end over a length-limited reader instead: it still reads into
uninitialized spare capacity, but its growing sequential reads keep
readahead pipelined. Warm windows cost the same.
* Revert "perf(ecstore): keep readahead pipelined for local batch windows"
This reverts commit c252fca525.
On the ESSD-backed cloud footprint, the growing read_to_end reads were
slower than one window-sized positioned read for cold windows at nonzero
offsets (cross-block -27% on 4 MiB layouts, cross-shard -21% on 64 KiB
layouts versus the previous batch reader). The local benchmark that
motivated the change ran on a WSL virtual disk and did not represent the
target storage. Keep the single positioned read into spare capacity and
the per-shard dispatch for large windows.
* perf(ecstore): choose the batch read method by window size
Measured on ESSD-backed cloud storage, a cold window of about 1 MiB is
fastest as one positioned read, which completes as a single device
request, while windows of 2 MiB and more are faster with growing
sequential reads that keep readahead pipelined (one large read waits on
each readahead chunk in turn). Use one positioned read up to 1.5 MiB and
a seek plus length-limited read_to_end above it. Both paths read into
uninitialized spare capacity; per-shard dispatch for large windows is
unchanged.
* perf(ecstore): read local batch windows with an exact readahead hint
Kernel readahead sizes its first request from the read size. A cold
16 KiB window at offset 0 pulled 64-128 KiB, and a single 2 MiB read was
split into serial readahead chunks that cached almost twice the window,
which is why neither the single positioned read nor growing sequential
reads won for every window size on block storage.
Announce each window with POSIX_FADV_WILLNEED, which submits exactly the
window at once, and then fill the exact spare capacity with positioned
reads. This replaces the size-based choice between the two read methods.
The hint is advisory and its failure does not fail the read. A residency
test checks that cold reads cache only their window; it failed with the
hint disabled (a 5-page window cached 32 pages).
* perf(ecstore): use half-shard read quantum at 1 MiB EC layout
* revert(release): defer certification rollout for 1.0.5 (#9254)
Revert e5563e6004 only on release/1.0.5. Its trusted verifier workflow and immutable-candidate integration are not available yet. Restore the previous publication path under the approved release policy; retain the completed product regression and preview acceptance requirements.
* fix(ecstore): preserve legacy full-shard framing for default 1 MiB layout
* perf(ecstore): enable direct-memory GET and coalesce cross-shard range reads for bounded-quantum blocks
* chore(ecstore): remove unused schedule_bitrot_reader_task wrapper
* fix(ecstore): run delete-recovery discovery off the metadata lane
Bucket-wide delete-recovery discovery starts with the server and walks the
whole bucket tree in pages of up to 4096 entries, one lstat per entry. Each
page ran on the per-disk namespace queue's foreground lane, which has a
single worker and also serves GET metadata reads. On a cold tree a page
holds that worker for hundreds of milliseconds, so every GET on the disk
waits behind it until the walk finishes.
Run the page on the queue's sync lane instead, as the delete-transaction
inspection already does for the same reason. The namespace lease and the
page bounds are unchanged.
The regression test occupies the foreground lane and requires a discovery
page to complete within ten seconds; it times out without this change.
* test(ecstore): align read_appending rollback assertions on error
* test(ecstore): satisfy needless_range_loop in deferred shard open test
Rust 1.100 clippy rejects indexing setup.attempted with the loop variable.
Iterate the same two entries instead; the assertions are unchanged.
* fix(ecstore): keep the EC block size projection out of user_defined
ObjectInfo::from_file_info_parts projected the persisted erasure block size
into user_defined as x-rustfs-internal-ec-block-size and
x-minio-internal-ec-block-size for every local version, including objects
written with the default layout. Writers that turn user_defined back into
stored metadata then persisted both keys: a metadata-replacing copy_object
(set_disk/ops/object.rs replacement_metadata) and put_object_metadata, used
by the replication status write-back. The same-version restore metadata
update also stopped matching its protected-metadata check, which made
restore_metadata_copy_preserves_tags_expiry_and_version_order fail.
The projection now lives in ObjectInfo::ec_block_size, read through
effective_ec_block_size(), so response headers are unchanged and stored
metadata keys stay what main writes. The put_object and new_multipart_upload
strips stay: internal PUT origins can still supply internal keys verbatim.
Changed assertions:
- from_file_info_projects_persisted_ec_block_size_for_responses and
from_owned_file_info_preserves_restored_ec_block_size_projection asserted
the key inside user_defined; they now assert the accessor and that neither
spelling is in user_defined.
Tests added:
- default_layout_metadata_copy_persists_no_ec_block_size_projection
- default_layout_replication_status_writeback_persists_no_ec_block_size_projection
* fix(ecstore): split bounded frames on the coalesced shard write path
The encoder writes shards through BitrotWriterWrapper::write_shard_bytes
since #9346. That path wrote a shard as one bitrot frame, so a bounded read
quantum (frame smaller than the shard) failed with "data size exceeds shard
size" on every non-inline write. The defect exists only on the tree that
merges this branch with main, and only with RUSTFS_EC_READ_QUANTUM_ENABLE on;
the default layout never selects a bounded frame.
Shards larger than the frame now go through the same frame splitting as
write(). Protected writes never select a bounded quantum; a shard-integrity
spec together with bounded frames is refused instead of dropping the digest.
Red before, green after: bounded_quantum_heal_restores_exact_frames_and_range_bytes,
bounded_quantum_shards_pass_disk_verification_and_deep_heal,
version_only_copy_preserves_quantized_shared_data.
* test(ecstore): pin the exact key set of a replication status write-back
The default-layout write-back test now asserts the precise keys main adds
(the status keys, X-Amz-Replication-Status and the data-moved markers)
instead of a subset check.
* Drop legacy EC block-size projections when reading metadata
---------
Co-authored-by: Xiaoyang Han <lux1an@qq.com>
Co-authored-by: marshawcoco <marshawcoco@gmail.com>
* fix(scanner): finish wide directory scans across cycle deadlines
* fix(scanner): resume durable per-disk progress across handoffs
* fix(scanner): bound checkpoint storage and resume verified page reads
* fix(scanner): keep recoverable pages across long cycle intervals
* test(scanner): share primary page fault injection
* fix(scanner): preserve progress across owner cancellation
Port the scanner fix from #9546.
* fix(scanner): recover abandoned checkpoint page bundles
Record staging before writing pages and persist cleanup with a replacement checkpoint. Restore checkpoints with background disk admission and update the affected tests to pass cancellation tokens.
* test(scanner): adapt cache and lifecycle cases to current scanner inputs
---------
Co-authored-by: overtrue <anzhengchao@gmail.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
* fix(ecstore): preserve DualInFlight stripe order in ErasureDecodeReader
In ErasureDecodeReader, poll_fill_result() previously extended
self.prefetched_bufs with lookahead stripes (queued_buffers, stripe
2k+1) before returning the primary stripe (buf, stripe 2k) to
poll_prefetch(). When a DualInFlight fill completed while output_buf
still had unconsumed bytes, poll_prefetch() pushed stripe 2k onto the
back of self.prefetched_bufs after stripe 2k+1, swapping adjacent
(2k, 2k+1) stripes on multi-block GetObject reads.
Return (buf, queued_buffers) from poll_fill_result() without mutating
self.prefetched_bufs, and extend self.prefetched_bufs with
queued_buffers in poll_prefetch() only after buf has been installed in
output_buf or pushed to self.prefetched_bufs. Also account for
non-empty self.prefetched_bufs when checking output_has_remaining and
deferring prefetch errors, and add a unit regression test.
* refactor(ecstore): factor FillBatch type alias in ErasureDecodeReader
Extract `type FillBatch = (Vec<u8>, VecDeque<Vec<u8>>)` for the
`poll_fill_result` return type to satisfy `clippy::type-complexity`.
---------
Co-authored-by: Jinhao Hu <jinhaohu@google.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
Eliminate the 1 MiB -> 2 MiB encode_buffer reallocation in small_ingest_capacity, make HardLimitReader::poll_read zero-copy via ReadBuf::take, remove redundant BufReader wrappers around StreamReader, borrow InlineData during DELETE Stage 1, and hand off local published delete receipts directly from Stage 2 to Stage 3.
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
* feat(scanner): expose scan work and reuse observations
* fix(scanner): preserve baselines during backup catchup
Require decoded-primary provenance before accepting an unchanged baseline after its backup catches up. Keep current-revision CAS and publication fences, and align the real checkpoint fixture with the bounded-cycle carry contract.
* fix(scanner): cap superseded retries at the nominal cycle
* fix(usage): validate cached statistics against bucket identity
* feat(scanner): observe bucket reuse and production proof gates
* fix(ci): give the multipart refusal fixture its storage stack
* test(admin): bind snapshot fixtures to current bucket identities
* fix(scanner): require a measured baseline for admin usage overlays
* fix(scanner): reject unmeasured admin usage snapshots
Validate the persisted scanner baseline before identity filtering can mark
it as displayable. Cover two buckets with only one current identity and
adapt the backup catchup cache save calls to the merged API.
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* fix(scanner): recover interrupted local drive scans
* fix(scanner): bound initial local drive binding
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
* fix(s3): map CompleteMultipartUpload checksum mismatch to BadDigest
Return structured rustfs_rio::ChecksumMismatch errors from SetDisks::complete_multipart_upload when a completion checksum header mismatches the upload's algorithm, checksum configuration, FULL_OBJECT digest or part-count suffix, or COMPOSITE digest, so the S3 usecase maps rejections to HTTP 400 BadDigest instead of 500 InternalError without publishing the object or retiring the upload.
Fixes#9272
* fix(ecstore): preserve legacy unconfigured-upload checksum behavior
Let unconfigured multipart uploads continue delegating want_checksum validation to Checksum::matches against the empty combined part-digest buffer instead of rejecting every non-empty header outright. Non-matching digests still return ChecksumMismatch (400 BadDigest), while empty-buffer digests such as CRC32 AAAAAA== preserve the legacy 200 echo behavior pinned by embedded_gateway_stack_test.
* fix(ecstore): reject zero-part full-object checksum suffixes
* fix(ecstore): accept stored-record full-object checksums
A wire -N suffix (including -0) sets MULTIPART without INCLUDES_MULTIPART, while stored multipart records carry both flags with want_parts == 0. Treat only the former as a suffixed claim so a matching stored-record FULL_OBJECT checksum still completes, and cover it alongside the existing -0 and -1 rejections.
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
* fix(heal): admit replacement data directories on configured mounts
Verify the mount ID of the pinned data directory against the expected mount root and retain the existing physical-device checks. Reject the newly exposed directory when the intended mount is missing.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(heal): probe replacement mounts as one pinned batch
Resolve each target once and check mount identity on the same handles before and after taking execution leases. Verify mount boundaries with bounded kernel lookups and resolve each local device once per batch.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(heal): reuse the privileged replacement mount fixture
Exercise configured subdirectories and unmount rejection in the existing independent-mount case. Reuse the mount namespace and keep the existing ignored-test ceiling.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ci): remove stale form helper and unused hotpath dependencies
Remove the test helper left by the gateway merge. Keep profiling feature forwarding in protos and activate rio instrumentation only for profiling builds.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): reuse the pinned replacement mount identity
Capture device, inode, and mount ID when opening the pinned root. Reuse that identity for live endpoint checks and avoid a duplicate lookup when the endpoint is the expected mount root.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(heal): bind replacement intent to the execution lease
Persist the identity of the admitted mounts and keep the live fence immediately before formatting. Compare ordered identity snapshots without allocating on the scan path.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): report missing native pool recovery evidence
Distinguish failed proof stages without changing repair admission. Exercise four-node subdirectory replacement below write quorum and after a third survivor returns.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): inspect native pool recovery evidence in one pass
Preflight pool slots before disk I/O and use the authenticated Inspect RPC as the capability check. Stop on the first ordered read failure before planning or applying a repair.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
* fix(s3): reject DELETE requests on ACL subresources
* fix(s3): keep ACL admission within the s3s footprint budget
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
* refactor(rdma): bind the NVIDIA cuObject server SDK in RustFS
* fix(rdma): preserve channel capacity and reuse contiguous registrations
* perf(rdma): transfer ownership of cuObject upload buffers
* fix(rdma): validate cuObject routing fields before transfer
* refactor(rdma): isolate the cuObject server SDK in a sys crate
* docs(rdma): document the workspace cuObject server bindings
* perf(cuobject): reuse channels and completion registrations
* fix(rdma): release eager PUT staging before requesting more chunks
* fix(rdma): consume CQ readiness and copy only retained PUT frames
* fix(rdma): release consumed streaming PUT frames before the next read
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
* fix(notify): quarantine unreachable targets instead of failing the runtime
A target that cannot activate is a per-target health outcome, not a
lifecycle transition failure. Turning it into a transition error left
the generation permanently unconverged, so every notification admin call
re-entered the failing reconcile and answered 500, and the broken target
could not be removed because only the /reset DELETE route existed.
Publish the generation with the failed target quarantined, gate admin
access on the shared runtime_lifecycle_is_published() predicate, and
register the bare DELETE /v3/target/{target_type}/{target_name} route.
The one-shot initialize() API keeps its strict retry contract.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* perf(notify): publish quarantined generations instead of rebuilding forever
is_converged() answered "did every target activate?" but was used as
"does the runtime need rebuilding?". One unreachable target therefore
left the generation permanently unpublished, and the 5s reconciler tore
the whole runtime down and rebuilt it on every tick: 9 full rebuilds
(measured: create + init probe + queue reopen + replay restart + close)
in 30s, which is where the delayed first events after a restart come from.
mark_published now always advances the applied generation and records
per-target completeness separately, so is_converged() means "published".
The reconciler's rebuild trigger and the admin availability gate are
correct with no call-site changes, and runtime_lifecycle_is_published()
is gone again. the one-shot initialize() API keeps its strict contract
through the new all_targets_activated() signal.
prepare_target no longer drops store-less targets whose init failed:
they stay quarantined like store-backed ones, so recovery never needs a
runtime rebuild and PrepareTargetResult::Failed disappears.
Measured on the issue #9545 scenario: 0 rebuilds in the 30s window that
previously saw 9, with the admin surface unchanged.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* style(notify): match the lifecycle module's log field shape
The quarantined-target warning carried its own message where every
sibling entry in this module labels itself "notify runtime lifecycle"
and lets the state field distinguish the outcome. Conforming keeps the
event stream uniform and drops the second copy of the sentence.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
* perf(notify): share the dispatch entity and stop dropping rules on read errors
Three findings from a full pass over crates/notify.
The dispatch loop built one EntityTarget per matched target and deep-cloned
the whole Event into each one, plus two Strings. Every field is event-level
and every Target::save reads it without mutation, so build it once and share
it across the matched targets: one Event clone per event instead of one per
target.
get_bucket_rules turned any metadata read error into "no rules", and
rules_for_metadata then evicted the cache, so one transient store error
silently discarded every notification for that bucket. A failed read is not
authority to drop compiled rules; serve the last metadata-backed snapshot
and log it. Entries installed by set_bucket_rules carry no metadata snapshot
and stay unusable once a source is bound, which is the invariant the
store-loss test already pinned.
Cached rules are now shared by Arc instead of cloned per event.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(notify): stop cloning the event and target id on every dispatch
Two remaining per-target costs on the dispatch hot path, both paid on every
event for every matched target.
`Target::name()` is `self.id().to_string()`, which clones the two Strings in
`TargetID` and then formats a third. It was resolved unconditionally and used
only by `debug!` fields, and `target_for_task.id()` was called again at each
log site. Resolve the identifier once per target and hand that value to the
task.
`build_queued_payload` cloned the whole event into `vec![event.data.clone()]`
just so it could be serialized. `PluginEvent: Serialize`, so the record can
borrow: combined with the shared `EntityTarget`, a dispatch to N targets now
deep-clones the event once instead of N+1 times.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(admin): make the operation types as public as the router
`pub mod admin` exports `pub struct S3Router`, but the impl blocks are
bounded by `Operation`, which was `pub(crate)`. That trips
`-D private-bounds` on `--all-targets` and fails the workspace clippy
gate. `AdminRequest` and `AdminResponse` sit in the same position and are
widened alongside it, so the handler trait is nameable at the visibility
its only implementors already live at.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): make hotpath optional where no code uses it
Sixteen crates pulled `hotpath` in unconditionally while their sources
never reference it: it is only there to forward `hotpath`/`hotpath-*`
features. The unconditional edge is what the cargo unused-dependencies
lint reports. Marking the dependency optional keeps the feature
forwarding working and drops the profiling crate from builds that never
enable it.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(notify): share rule target ids and drop the over-broad read fallback
Matching an object key cloned every matched `TargetID` out of the rule
sets, and each of those owns two Strings. The sets now store
`Arc<TargetID>`, so a match collects reference-count bumps instead; the
insertion wraps once. `TargetID: Hash + Eq` and `Arc<T>: Borrow<T>` keep
the lookups unchanged.
This also reverts the earlier "keep the last rules when the metadata read
fails" fallback. `rules_from_metadata` already states the policy:
unreadable metadata is not authority to keep an old subscription, and
`notification_dispatch_follows_peer_reload_delete_and_recreation` pins it
- after `delete_bucket` the lookup fails and the compiled rules must go.
The only errors `get_bucket_metadata` produces are that absence and an
uninitialized metadata system, so the fallback bought nothing and cost
correctness. `rules_for_metadata` is back to the Option form, and
`cached_rules` no longer needs a provenance switch.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
* fix(iam): verify the parent password for Console STS rotations
* fix(iam): revalidate STS sessions during password rotation
* fix(admin): scope test router operation bound to the helper
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
* fix(replication): durably decommission unreachable sites
* fix(replication): declare native error macro at removal boundary
* fix(replication): preserve removal state and edit execution context
* fix(replication): use storage boundary aliases in removal tests
* fix(replication): sign local removal probes with the admin session
* fix(admin): scope legacy test helper bounds to the method
* test(connect): stabilize concurrent rotation timeout coverage
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
* fix(connect): align agent v1 job schema and fail-closed fixture validation
Align the Agent v1 job envelope schema with the Rust runtime constants and
make fixture validation fail closed instead of silently skipping unknown or
unapproved cases.
- Pin drive CPU, memory, output, sample-period and timeout limits to the
runtime values and require 64-char lowercase hex keyIds plus canonical
Base64URL encoded Ed25519 signatures and nonces.
- Select the schema for each reject vector from that vector's own base
instead of always using the first accept-vector schema.
- Fail on schema gaps unless they are explicitly allowlisted, and fail on
unknown bases, duplicate IDs, invalid pointers and stale allowlist entries.
- Enable jsonschema FormatChecker so date-time values are actually asserted.
- Add Python regression suites, the fixture verifier, the regression runner
and a GitHub Actions workflow.
Verified with scripts/run_agent_v1_regression.sh:
- 25/25 Python tests pass, 16/16 standalone schema tests pass.
- Fixture manifest: ok=68 bad=0.
- Accept vectors 2/2; reject vectors 10 rejected by schema and 2 approved
runtime semantic gaps.
* fix(connect): validate JSON Pointer array indices and root manifest coverage
Two fail-closed gaps in the fixture verifier:
- Array tokens were converted with int(), which also accepts "-1" and "01".
A reject vector such as /items/-1 could invalidate a different element and
still be reported as rejected. Validate each token against the RFC 6901
array-index grammar before indexing, including for removal.
- The root manifest was never compared with the fixture sets on disk, so an
empty or partial root still reported success. Require every fixture set to
be listed exactly once at the root, and fail on missing, extra or duplicate
entries.
Add regressions for negative and zero-padded indices, empty root manifests,
unlisted fixture sets and duplicate root entries.
* fix(ci): pin agent protocol workflow actions
* fix(ci): bound the agent protocol regression job
* fix(ci): register the agent protocol validation workflow
---------
Co-authored-by: WinstonCCC <WinstonCCC@users.noreply.github.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
Reserve the exact canonical request size before encoding batch rename fields. This removes geometric Vec growth on both client digest attachment and server verification without changing canonical bytes.
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* fix(rio-v2): resume DARE package reads after a mid-ciphertext Pending
DecryptReader reset `ciphertext_read` to zero every time it entered the
ciphertext loop. When the inner reader returned `Pending` partway through
a package, the next poll skipped the already-buffered header and refilled
the ciphertext buffer from its start, overwriting the bytes read before
the `Pending` and shifting the rest of the stream. A single-package object
then ended in "unexpected EOF while reading DARE ciphertext" and a
multi-package object in "DARE authentication failed".
The legacy GET path feeds the decrypt reader from a bounded duplex pipe,
so every rio-v2 encrypted object with a package straddling a point where
the reader outruns the producer failed to read back: stored sizes of
64 KiB + 1 to 128 KiB (64 KiB pipe, smaller than one package), 512 KiB + 1
to 1 MiB (512 KiB pipe), and larger objects whenever the next erasure
block arrived late. Stored data was never affected, so objects written
before this change read back correctly.
Keep the counter across polls: it starts at zero and is cleared only once
a package has been opened. The regression tests cover the reader behind a
pipe that reports `Pending` at each refill, and the GET reader stack
behind the pipe size production picks for inline-range, multi-megabyte,
and multipart objects.
* fix(rio-v2): fail multipart DARE reads that end before a listed part
A multipart DARE stream is the concatenation of each part's package
sequence. When the stream ended exactly on a part boundary, right after a
final-flagged package, DecryptReader had read no package of the next part
and took the clean EOF for an empty object, so a stream missing whole
trailing parts read back as complete. A full-object read was still caught
by the outer length limit, but a ranged read returned a short body without
an error.
The reader could not tell a missing part from an empty one, because an
empty part stores no package. The caller now supplies that distinction:
the multipart constructors document that only parts with stored bytes are
listed, a clean EOF before a listed part's first package is an
`UnexpectedEof`, and the ecstore read path drops zero-size parts from the
list it hands to the rio-v2 reader. An object whose last part is empty
keeps reading back, which the new ecstore test pins down.
NumericGreaterThanIfExists was evaluated with i64::ge, so a request whose
condition value equals the policy threshold matched. Every other operator
keeps its comparison and only treats key absence as a match, and its
*IfExists variants are built from the generic wrapper; this one special case
silently widened a strict numeric bound into an inclusive one.
Evaluate it with i64::gt to preserve the operator's comparison while keeping
the absent-key behavior.
* fix(sse): drop the SSE-S3 header from SSE-C multipart responses
CreateMultipartUpload, UploadPart, UploadPartCopy and
CompleteMultipartUpload on an SSE-C upload answered with
`x-amz-server-side-encryption: AES256` next to the customer-key
headers. That header names a managed algorithm, so the response
described an SSE-S3 object.
SSE-C metadata and encryption material record `AES256` as their
server-side-encryption value. PutObject, GetObject and HeadObject
already leave it out of an SSE-C response; the four multipart
projections forwarded it unchanged. They now return only the
customer-algorithm and customer-key-MD5 headers for SSE-C. SSE-S3 and
SSE-KMS multipart responses are unchanged.
* fix(sse): drop the SSE-S3 header from SSE-C CopyObject responses
CopyObject to an SSE-C destination answered with
`x-amz-server-side-encryption: AES256` next to the customer-key
headers, for the same reason the multipart responses did: the SSE-C
material records `AES256` as its server-side-encryption value and the
response forwarded it. It now returns only the customer-algorithm and
customer-key-MD5 headers, as PutObject does. Copies to SSE-S3 and
SSE-KMS destinations are unchanged.
* fix(admin): report inventory coverage and cluster scanner activity
Join the current bucket namespace with measured usage for matching bucket identities. Report the elected scanner coordinator and previous attempt to clients connected to any node, with explicit coverage when measurements are unavailable.
* fix(admin): verify scanner attempts and preserve inventory lookup budgets
Start identity validation after snapshot refresh. Record terminal scanner outcomes at the bounded wait boundary and trust the durable fence for successful completion. Assert that the real leader and followers agree on an active cycle and its completion.
* test(e2e): register the cluster scanner regression in distributed selection
The controlled follower test adds one unconditional case to the 4-node profile. Pin the resulting 111 test IDs so the distributed workflow reaches the test runner on both supported platforms.
---------
Co-authored-by: Chris An <anzhengchao@gmail.com>
* fix(s3): build native RDMA upload bodies for PUT requests
* fix(nixl): reclaim idle peer registrations after native completion
* fix(nixl): start peer idle expiry after the last transfer finishes
* fix(nixl): retain transfer permits and preserve cached peers on failure
* fix(server): emit absolute encoded POST Object Location
Browser POST uploads with success_action_status=201 currently return a
relative, unencoded Location such as /bucket/a+b c%d.txt. Clients that
decode the field the way AWS formats it treat + as a space.
Rebuild PostResponse Location as an absolute URI from the request host,
scheme, and addressing style, percent-encoding the object key with RFC
3986 path rules (space as %20, slash preserved as a separator).
Fixes#9259
* test: use typo-safe UTF-8 fixtures for POST Object Location
crate-ci typo tokenizes the caf prefix in caf%C3%A9 as a misspelling of
calf. Keep a UTF-8 percent-encoding case, but avoid that false positive.
* fix(s3): preserve entity-like text in POST Object keys
* Initial plan
* fix(scanner): scan online single drives marked as healing
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* fix(scanner): route healing marker through storage boundary
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* perf(scanner): skip unused heal disk inventory
Avoid building and cloning the cross-drive inventory for single-drive scans and scans with healing suppressed. Exercise durable usage publication and cursor advancement through the runtime cycle.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(scanner): use scan domain for test marker import
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* refactor(scanner): scope heal inventory to coordinator workers
Build the inventory only for coordinator-owned cross-drive healing and expose the regression marker directly through the scan storage domain.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ci): restore admin gateway runtime checks
Stream diagnostic uploads through the existing admission gate and retain rebalance metadata error diagnostics. Align the authorization regressions with the current implementation and remove the unused POST form test helper.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): harden remote rename handling
Start a fresh bounded quarantine when a dispatched rename becomes ambiguous so detached disk work cannot be immediately replaced after the RPC deadline. Pre-size inline FileInfo MessagePack buffers from their resident payload to avoid proven growth without changing wire bytes or durability semantics.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): expose rename quarantine fault metrics
Keep admission timeouts and quarantine lifecycle visible when detailed PUT diagnostics are disabled. Tie released accounting to permit ownership so runtime cancellation cannot leave the active gauge stale.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
The known-deviation marker in MP-03 accepted any SSE headers that
contained the expected ones, so an unrelated extra header, the raw
customer key included, was still reported as the known deviation. It now
tolerates exactly the one documented difference and fails on anything
else.
The observation of a result document kept only the set of element names.
A wrong part size, a missing part or reordered parts in a listing changed
nothing, so a comparison between two binaries could not see them. It now
keeps every leaf with its value in document order and reduces only the
elements that vary between runs: upload ids, timestamps, markers and
ETags of encrypted objects.
`suite.py selftest` checks both offline, together with the rules of the
comparison. Against the previous observation code it fails on the three
listing cases. The comparison of this branch with its base still shows no
blocking difference in either build.
Unit tests cannot show that moving SSE into its own crate left what a
client sees, and what lands on disk, unchanged. This suite drives a real
server process and can compare two binaries.
- 30 cases over six process configurations: no key source, a loaded and
an invalid local master key, the Local KMS backend with per-key
authorization off and enforced. They cover round trips and response
headers, bucket default encryption, CopyObject, multipart uploads,
run-time KMS stop and start, malformed requests and authorization.
- Every HTTP exchange inside a case is recorded as an observation:
status, error code and message, SSE headers, response header names,
body hash, and the encryption metadata key names stored for the
object. `diff` compares two runs field by field against a closed list
of accepted differences.
- `cross` has one binary write every stored form and another read the
same data directory.
- A registered binary is pinned by SHA-256, and a run fails when the
stored form does not match the build the binary was registered as.
Results for this branch against its base, default build: 93 verdicts and
252 exchanges equal, no blocking difference; the only accepted one is the
new `sse_local_master_key` startup event. Cross reads pass in both
directions, 42 objects each.
The suite also pins two behaviors that predate this branch. Multipart
responses for SSE-C uploads carry `x-amz-server-side-encryption: AES256`
besides the customer-key headers; MP-03 records that as a known deviation.
A `rio-v2` build cannot read back encrypted objects of roughly 64 to
128 KiB, or of 3 MiB and more, so under that build the comparison only
shows that both binaries fail the same cases.
One function wrote the stored metadata of every keying mode, and one
function read it back, each switching on the mode and the build inline.
Give a mode both directions of its own record instead.
- `core/keying/direct.rs` records and reads the Direct record
(`record_customer_key_nonce`, `record_wrapped_data_key`,
`read_wrapped_data_key`).
- `core/keying/object.rs` records and reads the sealed-key record in
MinIO's slots (`record_sealed_customer_key`,
`record_data_key_in_minio_slots`, `read_sealed_data_key`).
- `encryption_material_to_metadata` records the scheme and hands the key
to the mode that formed it.
- `core/keying/stored.rs` reads in three named steps: the recognition
order of the modes (`read_stored_data_key`), the choice of the
provider that unwraps the data key (`unwrap_stored_data_key`), and the
opening of the object key. A stored key carries its mode as
`StoredKeyMode` rather than as an optional sealed key.
No behavior change. The stored metadata is identical for every
combination of scheme, mode, sealed key, key id, context, and size in
both builds, and the order of the read-side failures is preserved.
Record in the crate instructions what the split settled: where startup
state, the entry points, the S3 layer, the keying layer, and the
data-key providers live, and the rules that keep them apart.
- `core/keying/` never imports from `core/s3/`; `core/s3/` reads stored
metadata only through `core/keying/metadata.rs`.
- `rio-v2` conditional compilation stays under `core/keying/` and `kms/`.
- A new stored format is added under `core/keying/` without changes
under `core/s3/`.
The read entry points decided the scheme, authorized the key, and
recovered the object key in one function, with the SSE-C preamble and
the managed key resolution written out twice. Separate the steps.
- `core/keying/stored.rs` (new) recognizes how a stored object was keyed
(`recognize_stored_managed_key`) and recovers its key
(`open_under_customer_key`, `open_under_stored_data_key`). The unwrap
body moves there unchanged.
- `core/s3/ssec.rs` gains `require_matching_ssec_key` and
`stored_ssec_algorithm`, shared by the unwrap and the response-header
paths.
- `core/read.rs` orders the steps: recognize, name the key, authorize,
recover. Both read entry points resolve the key through one helper, so
authorization and the response header cannot name different keys.
- `core/keying/` no longer imports from `core/s3/`: the request check
`reject_kms_context_location_override` moves to `core/s3/headers.rs`,
and the legacy SSE-C nonce hashes with `md5` directly.
`rio-v2` conditional compilation is now confined to `core/keying/` and
`kms/`. No behavior change: the order of checks on a read is preserved.
The write entry points mixed two questions: which SSE scheme S3 asks for,
and how this build forms and stores the object key. Give each a home.
- `core/s3/scheme.rs` gains `resolve_write_scheme`, which validates the
headers and resolves the request, then the bucket default, to a
`WriteScheme`. PutObject and CreateMultipartUpload now share it; the
second copy of that decision (`SseTypeV2`,
`prepare_sse_configuration_v2`) is removed.
- `core/keying/` gains one constructor per key source
(`new_key_under_customer_key`, `new_session_key_under_customer_key`,
`new_key_under_data_key`) in each mode. `keying/mod.rs` is the only
place that says which mode a build writes.
- `core/write.rs` only orders the steps and no longer carries any
`rio-v2` conditional compilation.
No behavior change. A multipart session still validates the SSE-C key at
creation only in the mode that seals the session key under it.
`SseTypeV2` leaves the public surface; nothing outside the crate used it.
Give rustfs-sse one entry point, `startup::init`, for the state that is
fixed for the lifetime of the process. The server calls it where it used
to log the SSE-KMS key policy mode.
- Resolve the key policy enforcement switch once and log its mode.
- Check `RUSTFS_SSE_S3_MASTER_KEY` at startup and report it through the
`sse_local_master_key` event as `loaded`, `not_set`, or `invalid`. An
unusable value is logged as an error; startup still succeeds and
requests fail exactly as before.
- Return a `StartupReport` so the caller can see both results. Repeated
calls return the first report without logging again.
Anything that follows the KMS service state stays resolved per request:
the service follows configuration and can be started, restarted, or
stopped from the admin API while the process runs.
`get_local_sse_dek_provider` becomes synchronous, since it never awaited
anything. The "Using RUSTFS_SSE_S3_MASTER_KEY for SSE-S3" line that was
logged when the key was first used is replaced by the startup event.
Move every item of the single-file crate into modules without changing
any of them:
- core/s3: what S3 defines for SSE (request headers, scheme selection,
SSE-C validation, key-policy authorization)
- core/keying: how RustFS seals and records object keys (key material,
direct and object-key forms, stored metadata, encryption context)
- core/{request,write,read,rewrap,audit}: the per-request entry points
- kms: data-key providers (KMS-backed, local master key, MinIO
builtin-KMS ciphertext) and the provider registry
The rio-v2 only modules carry the feature gate at module level instead
of on each item. Inline tests move to a crate-level tests module. The
public surface is unchanged and is now an explicit re-export list in
lib.rs; visibility is otherwise tightened to pub(crate) or private.
Documentation that cited the old file now points at the module that
holds the symbol.
get_sse_type, sse_configuration_to_metadata and SseTypeV2::to_metadata have no caller in the crate, its tests, or the server. All three carried #[allow(unused)], which is what kept the compiler from reporting them.
Move the SSE-S3 / SSE-KMS / SSE-C key resolution, metadata and authorization logic out of rustfs/src/storage/sse.rs into a new crates/sse (rustfs-sse) so its outward references are explicit.
The crate depends only on rustfs-config, rustfs-kms, rustfs-policy, rustfs-s3-types and rustfs-utils. It does not reach the storage engine, IAM, the gateway or the server binary; scripts/check_architecture_migration_rules.sh now pins that dependency set.
Everything the crate needs from the running server arrives through the SseHost port (current KMS service, KMS manager state, bucket default encryption, per-key authorization). The host is an explicit parameter on every entry point that needs it rather than a global, so a missing installation cannot silently fall back to the local key provider.
The crate reports failures as SseError, which carries the S3 error code. The KMS-to-S3 error mapping moves with it and rustfs/src/error.rs reuses it, so response codes and messages are unchanged. The source of an SSE-internal error is no longer wrapped in StorageError::Io.
rustfs/src/storage/sse.rs stays as the adapter: it implements the host, binds the entry points to this server and converts back to ApiError, and keeps the conversions that cross the engine boundary (read-side resolver, multipart completion gate, reader error mapping).
Tests split with the code. Four provider round-trips over rio streams move to storage/sse_test.rs because the crate does not depend on rio. Cross-crate test seams sit behind the test-util feature, enabled only from the rustfs dev-dependencies. The rio-v2 CI lane and cache warm-up now include -p rustfs-sse so the rio-v2-only SSE tests keep running.
* chore(shear): stop ignoring hotpath and clear shear findings
Remove hotpath from cargo-shear ignored so feature-only usage is reported,
drop unused deps found by shear --fix, delete empty access_owned stubs, and
suppress false-positive unlinked paths for #[path] test modules.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): refresh workspace deps and bump faster-hex to 2.0
Run cargo update and cargo upgrade for compatible requirements, including
faster-hex 1.0.0 to 2.0.0. Existing hex_string/hex_decode call sites remain
compatible.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(zstd): import seekable directly for security tests
Use zstd_safe::seekable in the security test and document why the
seekable dev-dependency stays: it enables the feature and must remain
visible to cargo-shear as a real usage.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(admin): avoid private-bounds on S3Router test helper
Move call_legacy to a free function so the pub(crate) OwnedOperation
bound is not attached to a public inherent impl.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): drop unused hotpath and demote rio md-5 to dev-deps
Remove hotpath from crates that only feature-forward it with no source
usage, keep rustfs-* hotpath feature links, make rio's hotpath optional
for its cfg-gated measure_block!, and move rio md-5 to dev-dependencies.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): refresh lockfile and bump arrow/jiff requirements
Run cargo update, cargo upgrade, and cargo upgrade --incompatible.
Bump arrow/parquet to 60.2.0 and jiff to 1.0.2.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(scanner): run service_cohort tests on a larger stack
Linux libtest defaults to a 2 MiB test-thread stack; two-pool EC fixtures
overflow it and abort. Run each service_cohort case on a dedicated 32 MiB
thread, matching scoped_entry_fallback.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): upgrade russh-sftp to 4.0 and refresh lockfile
Run cargo update, cargo upgrade, and cargo upgrade --incompatible.
Bump russh-sftp 3 to 4 (opaque SftpHandle wire type), plus lapin,
hashbrown, and russh. Adapt the SFTP Handler and tests to SftpHandle.
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: RustFS <hello@rustfs.com>
The object-lock replication test builds its method-only envelope with from_parts.
The existing ignore attribute and the replication-count assertions stay.
* fix(scanner): retain unpublished bucket progress across leader changes
* test(scanner): verify remote completion reuse and publication floors
* fix(scanner): persist read-only checkpoint continuity
* test(scanner): avoid cloning the final activity fixture
* fix(scanner): resolve receipt owner before store startup
* fix(scanner): gate read-only handoff behind reader-first rollout
* test(scanner): accept consumed markers after heal startup
* test(scanner): run handoff rollback in the pinned release lane
* fix(scanner): preserve background admission during cache saves
* fix(scanner): admit remote cache publications as background I/O
* fix: handle disabled cgroup controllers in resource sampling
* fix(scanner): wait for namespace RPC preflight admission
* fix(scanner): align metric loops with current clippy
* fix: resolve Rust 1.100 workspace lint diagnostics
* fix(heal): simplify Linux test opt-in check
* chore(scanner): expose admission and allocator diagnostics
* fix(scanner): retry transient resource samples within one bracket
* fix(protos): retain cancelled RPC streams during response grace
* feat(diagnostics): track live Rust allocation bytes
* docs(diagnostics): explain unsafe allocator test scope
* fix(ecstore): reduce multipart recovery stack usage
* chore: refresh PR verification
* fix(protos): retain reset streams for the full cancelled burst
The branch's channel reset tests cancel 80 batches of 64 streams; main's 4096 cap spends the protocol-error budget on that burst, so keep the 8192 capacity under main's constant.
* fix(scanner): complete budget-stopped cycles with carried buckets pending
Align with main's partial-carry semantics: a work budget that stops a bucket whose certified value is carried completes the cycle with that bucket pending and the snapshot unconverged, instead of forcing the cycle incomplete.
The error-code tests build the envelope and the lifecycle restore
request directly. The legacy test wrapper stays for the transition
fixtures that still call it.
The engine projection tests build the gateway request directly.
The test-only s3s conversion is gone, and the member assertions stay
on the projection the use case calls.
The handler tests no longer construct an s3s request and convert it.
Region copying from a legacy request stays covered by
from_s3s_copies_every_named_extension. S3Request is gone from
rustfs/src/admin/handlers, and the s3s file count drops from 33 to 32.
* test(storage): restore POST form metadata policy fixture
* test(storage): follow the current PUT path in contract checks
* fix(storage): verify archive transport EOF before parsing the final frame
* test(rustfs): restore main verification after gateway migration
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(storage): retire the legacy S3 storage edge
* fix(storage): bound the audited multipart copy future and trace LIST quorum causes
* test(storage): pin legacy codec answers and trim test dependencies
* refactor(admin): confine the legacy route adapter to parity tests
* fix(deps): align bindgen and prettyplease on syn 3 for FIPS builds
* refactor(admin): keep Object Lambda authorization and responses on the owned request path
* fix(storage): expose the typed legacy cause on owned errors
* refactor(admin): read and return native GetObject fields for Object Lambda
* ci: ratchet the legacy S3 footprint after the control-plane migration
* refactor(admin): remove the unused envelope-to-extensions adapter
* test(admin): guard the Object Lambda response token checks at their definition
* refactor(admin): serialize AssumeRole credentials without the legacy DTO
* test(admin): assert native range and error types at the test boundary
* test(admin): compare errors in the legacy route parity tests
* refactor(notify): initialize event rules from persisted notification types
* refactor(admin): return the idle rebalance response on the owned HTTP path
* refactor(storage): keep the persisted-to-legacy XML oracle in tests
* test(admin): compare extension refusals using the native error code
* fix(obs): filter verbose native gateway protocol events at every sink
* test(storage): preserve stream lengths and request facts on retired seams
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* test(storage): restore POST form metadata policy fixture
* test(storage): follow the current PUT path in contract checks
* fix(storage): verify archive transport EOF before parsing the final frame
* test(rustfs): restore main verification after gateway migration
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(storage): retire the legacy S3 storage edge
* fix(storage): bound the audited multipart copy future and trace LIST quorum causes
* fix(deps): align bindgen and prettyplease on syn 3 for FIPS builds
* fix(storage): expose the typed legacy cause on owned errors
* test(storage): preserve stream lengths and request facts on retired seams
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* test(storage): restore POST form metadata policy fixture
* test(storage): follow the current PUT path in contract checks
* fix(storage): verify archive transport EOF before parsing the final frame
* test(rustfs): restore main verification after gateway migration
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(deps): align bindgen and prettyplease on syn 3 for FIPS builds
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): trim redundant syscalls in multipart part preparation
Use io_get_object_open_path in the advisory clean-source cache probe, reuse validated part-path prefixes when constructing MultipartSourceAdmission in prepare_part_transaction, and create new.meta before snapshotting absent old-part markers so old.data.absent and old.meta.absent share new.meta's inode via linkat.
* test(ecstore): guard marker inode identity check on hardlink support
Probe hardlink support in the test fixture before asserting that old.data.absent and old.meta.absent share new.meta's inode, and assert empty fallback markers when hardlinking is unsupported.
* chore(storage): remove unused test helper PostObjectFormPolicy::with_metadata
Commit 5e5554987 removed the last caller in rustfs/src/storage/access.rs, leaving with_metadata unused under #[cfg(test)].
* fix(rustfs): align control-plane speedtest, rebalance logging, and admin/auth tests
Register streaming PostV3SpeedtestClientDevnull on the gateway control-plane host, log error diagnostics on corrupt rebalance metadata loads, avoid 43-char OIDC parent key collisions in s3_extension_tests, align AddUser gate test with 88b90c131, and split auth.rs at mod tests.
* chore(deps): bump rustfs-gateway to d32f1721 for Windows file-fallback cfg
Pulls in rustfs/gateway#1622 (d32f17219d75989167a05183dd3d04922615cbd5) which gates Unix-only file-region adaptation in rustfs-gateway so Windows Startup Smoke compiles cleanly.
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
The tests module of storage/access.rs, its mounted reader and probe
tests, and the signed-query regression module are gone; their ported
copies run on the owned core. The five registered tests are deleted with
their register entries. access.rs keeps the hooks, the parity support
other modules still use, and four pins on legacy-only helpers that no
gateway-side test pins yet.
Each authorization test of storage/access.rs and its mounted files now
runs on the owned RequestEnvelope through the owned function its legacy
hook delegated to, with the same inputs and expected decisions. A shared
owned fixture replaces build_request and TestKms. The four access_owned
test files move under access_owned/tests and no longer build an s3s
request. Five tests that pin only legacy DTO helpers are registered for
retirement with their gateway-side replacements.
files 50 -> 49 and s3_error_lines 103 -> 95, as scripts/check_s3s_footprint.sh
measures them after the upload drain tests stopped implementing an s3s
S3 service.
* fix(http): send deferred HTTP/2 100 Continue
Backport upstream Expect handling onto Hyper 1.12.0 and cover the transport handshake and rejection boundaries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(http): use uppercase Expect token in fixture
Preserve case-insensitive Expect coverage without triggering the spelling guard.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(http): compact deferred Continue body state
Preserve the existing body size bound and H2 frame path while removing redundant state from the temporary Expect allocation. Cover spawned readers, size hints, trailers, and EOF.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(http): align Continue backport with upstream
Remove the local body-layout micro-optimization so the runtime patch exactly matches upstream Hyper PR #4217 while retaining RustFS regression coverage.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(storage): keep authorization tag lookup in infra
Move the store-backed ExistingObjectTag lookup behind the authorization core and keep legacy error conversion at the FS interface boundary.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(tests): align CI fixtures with current contracts
Distinguish AddUser primary and secondary admin gates, parse SigV4 civil time in UTC, and provide the required Object Lock snapshot for restore metadata copies.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* fix(ecstore): do not republish pool.bin for an unreachable drive
The pool.bin heal treated every drive whose state was not "ok" as a drive
to repair, offline and faulty drives included. A write cannot reach those
drives: while one was unreachable, each read repair republished pool.bin
to the reachable drives only, failed with SystemMetadataRepairRequired and
was retried, writing a new version every time. The drive came back one
version behind, while every node reported it ready.
In a set of three drives at EC:1, losing another drive in that window
left one current and one stale replica: pool.bin had no read quorum, the
node with the replaced drive could not start, and neither could any other
node that restarted.
Repair pool.bin only for a reachable drive that lacks the current copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ecstore): require replica damage before pool metadata heal
A timed-out or otherwise inconclusive metadata probe can leave a valid
pool.bin replica behind. Require confirmed missing, stale, or corrupt
metadata before publishing a new generation through the existing fence.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* style(admin): remove trailing whitespace in identity test
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(rustfs): restore gateway builds and clear CI lints
Backport 142cff57a and 2e286d322 from main. Reuse the admitted
request headers for POST archive controls and return the existing
S3 error type directly at both call sites.
Remove the unused form metadata projection left by the same merge
and keep the gateway policy test on the production field path.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Signed-off-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Regular parents now fence STS sessions by durable generation, so a session
stored without one is rejected as an unknown key. Publish the test sessions
with set_temp_user_from_parent, as the STS handler does.
The three UploadPart timeout tests drove the early-response drain around
a hand-written s3s S3 service. They now drive it around the gateway
stack as production configures it (GatewayStack::assemble_serving, a
test-only constructor over the same configured builder), serving an
UploadPart handler that reads its whole body as RustFS's handler does.
Every assertion is kept: 400 RequestTimeout, the HTTP/1 transport
retained for the drain and drained of the late bytes, the HTTP/2 body
dropped alone, and other HTTP/2 and HTTP/3 streams still served.
The gateway times a stalled body out with its own request-body idle
bound, so that bound is what the fixture sets; it does not follow a
paused tokio clock, so the HTTP/1-and-HTTP/2 case runs in real time
(200 ms bound) instead of advancing a paused clock.
Kept as written, the HTTP/2 assertion failed: GatewayStack::call added
`Connection: close` to any answer whose connection intent is to close,
HTTP/2 included, where the header is forbidden and only the stream
ends. It is now added to HTTP/1 answers only.
The retired legacy metadata route carried the website-host and metadata=true listing case tables, and a test that its authorization attaches the table listing snapshot. Re-create both against the gateway stack, observing the listing a caller receives, and probe the native admin and control-plane hosts for the unsigned x-amz header refusal.
The gateway stack was called through rustfs-gateway's tower adapter. Under the RustFS profile
that adapter wraps the request body, takes it back when the handler drops it unread, and reads
it in a task of its own spawned on the ambient runtime (unread_body.rs, Retention::settle). That
task took the body away from EarlyResponseBodyService before its abandon slot could see it, so
RustFS's own drain never ran: its task was no longer spawned under the HTTP/1-2 task owner,
graceful shutdown could report its children retired while a detached drain still held the
transport body, and the early-response drain metric and log went silent. On origin/main the
legacy stack was the default assembly, so the listener test never crossed the adapter.
GatewayStack::call now calls the service's own entry and keeps the adapter's connection
verdict (connection_intent_of). The inert drain_unread_request_bodies setting is removed.
EarlyResponseBodyService is again the only HTTP/1 unread-body drain, with Connection: close
and the configured idle bound.
The gateway-stack test that asserted the adapter's drain timeout now asserts that the stack
releases an unread body when it answers. The configured-timeout half moves to
gateway_rejected_http1_body_uses_the_configured_drain_timeout, which composes
EarlyResponseBodyService over the real gateway stack for a 1 s and a zero timeout.
Mutation: restoring the adapter call turns all three red:
http12_actual_early_body_drain_is_owned_until_release (the drain never starts),
rejected_http1_body_is_released_to_the_host_drain and
gateway_rejected_http1_body_uses_the_configured_drain_timeout.
Neither side of dual_stack_differential is started with the retired
stack selector any more, which the binary under test now refuses: both
sides run the binary under test, or side A runs the released reference
binary named by RUSTFS_E2E_REFERENCE_BINARY. RUSTFS_E2E_STACK_B is
gone; the injected-region control is unchanged.
server/layer.rs and server/hybrid.rs no longer reference s3s and leave
the edge allowlist; the baseline ceilings drop to the measured values
(files 50, s3_error! lines 103).
SigV4HeaderGuard, S3ErrorMessageCompat, DoubleSlashListBucketsCompat,
VirtualHostStyleHint and ObjectAttributesEtagFix patched the s3s edge
and have no work left: the gateway_stack legacy_layers tests pin what
each made the legacy stack answer against the gateway stack alone. The
layer unit tests go with the layers, and the server-domain flag that
only gated VirtualHostStyleHint goes with it.
EmptyBodyContentLengthCompat keeps its admin, console and internode
halves and loses its S3 half, which the gateway stack replaces by
leaving the bodies of bodyless operations unread; its S3 tests now
assert that such requests pass through unchanged.
The S3 service under the middleware now answers in EdgeBody, a boxed
Bytes body, with a boxed error, instead of s3s::Body and
s3s::HttpError. The gateway stack, the native console and the refusals
written in server/http.rs meet in that one type; Swift and the
internode RPC lane convert into it from rustfs_s3_types::Body.
ControlBodyDigestService is generic over its inner response body, and
its control-plane XML body limit is a named constant equal to the limit
the s3s edge applied.
Remove the S3Stack selector, the legacy s3s service assembly and the
gateway-stack cargo feature: the gateway stack, its native admin and
console hosts and the control-plane host are always assembled, and the
gateway crates are ordinary dependencies. The debug-only compile_error
guard goes with the feature.
RUSTFS_S3_STACK is retired: a server or an embedded server started with
it set, to any value including gateway or an empty string, refuses to
start with an error naming the variable and this release. The message
and its tests share one constant.
Tests that ran only on the legacy stack, or selected between stacks,
are retired; tests that ran on both now run on the gateway stack alone.
The s3s metadata/website route is no longer mounted and stays only
until the metadata-route branch replaces it.
Each entry names a legacy-only test, or the unit test of an s3s patch
layer, that the flip deletes, with the gateway-stack test that keeps
its contract (rustfs/backlog#2783). The commits that delete them delete
their entries.
The gateway selection gains a website service, chosen by its host claim
before the Keystone refusal, the native console, the native admin and the
control plane, as the legacy metadata route claims those requests first.
A parity test sends both request classes to both stacks over one store.
Install the RustFS dialect rows of ListObjectsV2WithMetadata and
ListObjectVersionsWithMetadata on the S3 table, let the early gate allow
them, and register one handler that runs the shared access phase, the
listing authorization and the shared listing answer. The rows keep their
overlaps with the standard listings and each other; the admin extension
rows they also shadow live on the control-plane host.
The legacy MetadataRoute now hands website requests to an owned WebsiteHost,
which reads through the owned GetObject/HeadObject authorization and use
cases with an anonymous request envelope, and hands metadata=true listings
to an owned module that authorizes and answers them on the request envelope.
The WebsiteRead marker moves with the website rules.
The gateway PutObject path carried no hotpath measurement. Measure execute_put_object_owned under the label the use case had before the legacy edge split, and extend the contract test to require it.
The legacy-only tests for keys outside the floor and for CompleteMultipartUpload request shapes now run on both stacks. The gateway answers every NUL and over-long key with one uniform refusal before the bucket is consulted, and differs from the legacy table on six completion shapes; both are pinned explicitly.
Rename storage/ecfs_extend.rs to storage/s3_support.rs, point its request-marker
imports at storage::request_markers, and move parse_object_version_id and
ListObjectUnorderedQuery out of storage/ecfs.rs into it. The module no longer
depends on FS, S3Access or storage::access. Behaviour is unchanged.
Authenticate the actual request signing secret against the authoritative regular-owner record before reading the registration body. Carry its epoch and identity revision through publication without rebinding to a newer owner.
Reject stale peer signing secrets and concurrent owner changes, including same-secret recreation, rotation back to an old secret, revision-only rewrites, and legacy-initialization readback races. Preserve the independent STS generation and unchanged-secret upsert policy.
Add deterministic real-store and handler regressions and document the secret-reuse boundary. This is a separate correction layer for #3266 above the generation-aware integration.
Validation: cargo fmt --all --check, git diff --check 05d9825, scripts/check_doc_paths.sh, and scripts/check_no_planning_docs.sh passed. Compilation, runtime tests, and Clippy are deferred as requested.
A custom error code nobody gave a status (the tier handlers' TierNotFound) was refused as a bare InternalError, so peers matching on the code never saw it. The legacy writer answers such an error 500 with its own code and message; handler_error now does the same for every status-less custom code. Errors with an unwritable header are still refused.
The authorization core moved under storage/authorization still called the
legacy FS type for this lookup, a reverse dependency the layer guard refuses.
The lookup now lives beside its only policy caller and FS delegates to it.
* perf(ecstore): reduce allocations for bounded bitrot frames
* test(s3): cover dynamic block layouts over HTTP
* perf: measure quantized range read shape
* chore: checkpoint quantized read metrics draft
Save work in progress for collaboration. Counts omit retired readers and transient or cancelled hedges. Frame semantics, async recorder coverage and disabled-metrics overhead remain unresolved; these counters are not ready for performance conclusions.
Validation: rustfmt and ecstore check passed; io-metrics 120, quantized 4 and hashed-read 3 tests passed. No new live or performance validation.
* perf(ecstore): reduce dynamic layout read overhead
* fix(ecstore): avoid prefetching conservative short range tails
* perf(ecstore): compact deferred shard reader state
* perf(ecstore): include shard checksums in file buffer cap
* fix(ecstore): preserve bounded quantum frames during heal
* perf(ecstore): reuse owned quantized frame batches
* perf(ecstore): batch q reads and retain shared copy framing
* fix(ecstore): preserve typed quantized read errors
* perf(ecstore): avoid zero-fill and serial copies in local batch reads
The local batch reader zero-initialized every window at a nonzero offset
before reading it, and copied every shard serially inside one blocking
task. Two-segment q-window range reads (cross-shard, cross-block) pay
both costs twice per request.
Read each window with a positioned read into uninitialized Vec capacity,
and dispatch each shard separately when every window is at least 512 KiB,
where copies dominate blocking-pool round trips. Smaller windows keep one
coalesced dispatch.
* perf(ecstore): keep readahead pipelined for local batch windows
A single window-sized pread on cold pages waits on each kernel readahead
chunk in turn. Seek to the window start and fill the buffer with
read_to_end over a length-limited reader instead: it still reads into
uninitialized spare capacity, but its growing sequential reads keep
readahead pipelined. Warm windows cost the same.
* Revert "perf(ecstore): keep readahead pipelined for local batch windows"
This reverts commit c252fca525.
On the ESSD-backed cloud footprint, the growing read_to_end reads were
slower than one window-sized positioned read for cold windows at nonzero
offsets (cross-block -27% on 4 MiB layouts, cross-shard -21% on 64 KiB
layouts versus the previous batch reader). The local benchmark that
motivated the change ran on a WSL virtual disk and did not represent the
target storage. Keep the single positioned read into spare capacity and
the per-shard dispatch for large windows.
* perf(ecstore): choose the batch read method by window size
Measured on ESSD-backed cloud storage, a cold window of about 1 MiB is
fastest as one positioned read, which completes as a single device
request, while windows of 2 MiB and more are faster with growing
sequential reads that keep readahead pipelined (one large read waits on
each readahead chunk in turn). Use one positioned read up to 1.5 MiB and
a seek plus length-limited read_to_end above it. Both paths read into
uninitialized spare capacity; per-shard dispatch for large windows is
unchanged.
* perf(ecstore): read local batch windows with an exact readahead hint
Kernel readahead sizes its first request from the read size. A cold
16 KiB window at offset 0 pulled 64-128 KiB, and a single 2 MiB read was
split into serial readahead chunks that cached almost twice the window,
which is why neither the single positioned read nor growing sequential
reads won for every window size on block storage.
Announce each window with POSIX_FADV_WILLNEED, which submits exactly the
window at once, and then fill the exact spare capacity with positioned
reads. This replaces the size-based choice between the two read methods.
The hint is advisory and its failure does not fail the read. A residency
test checks that cold reads cache only their window; it failed with the
hint disabled (a 5-page window cached 32 pages).
* perf(ecstore): use half-shard read quantum at 1 MiB EC layout
* revert(release): defer certification rollout for 1.0.5 (#9254)
Revert e5563e6004 only on release/1.0.5. Its trusted verifier workflow and immutable-candidate integration are not available yet. Restore the previous publication path under the approved release policy; retain the completed product regression and preview acceptance requirements.
* fix(ecstore): preserve legacy full-shard framing for default 1 MiB layout
* perf(ecstore): enable direct-memory GET and coalesce cross-shard range reads for bounded-quantum blocks
* chore(ecstore): remove unused schedule_bitrot_reader_task wrapper
* fix(ecstore): run delete-recovery discovery off the metadata lane
Bucket-wide delete-recovery discovery starts with the server and walks the
whole bucket tree in pages of up to 4096 entries, one lstat per entry. Each
page ran on the per-disk namespace queue's foreground lane, which has a
single worker and also serves GET metadata reads. On a cold tree a page
holds that worker for hundreds of milliseconds, so every GET on the disk
waits behind it until the walk finishes.
Run the page on the queue's sync lane instead, as the delete-transaction
inspection already does for the same reason. The namespace lease and the
page bounds are unchanged.
The regression test occupies the foreground lane and requires a discovery
page to complete within ten seconds; it times out without this change.
* test(ecstore): align read_appending rollback assertions on error
* fix: align multipart and EC read paths with current workspace APIs
---------
Co-authored-by: Xiaoyang Han <lux1an@qq.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
The gateway handlers, the owned envelope entry points, the protocol client and
the admin account-permissions probe now receive the owned S3 error directly.
authorize_request_core, its entry points, the denial log and the ListBuckets and
action-potential discovery decisions return the owned S3 error type; the legacy
hooks and tests convert at the call. The two source-reading guards that looked
for the table data-plane functions in access.rs (moved by the previous slice)
now read storage/authorization/table_data_plane.rs.
A JSON comparison of two bodies that are not JSON no longer agrees, which
turns two vacuous cases into byte comparisons. The table gains unknown,
deleted and service-account keys and a repeated Authorization line, the
caller probe gains header and query session tokens, and the console
listener's isolation is pinned in front of the control-plane host.
The control-plane host ran S3Router::admit inside its handler, after the
gateway had buffered the whole body, so an anonymous chunked admin PUT
made the host hold up to 20 MiB before answering 403. The host now
attaches each request's head before the gateway reads it and decides it
by S3Router::admit at the route-authorization stage, holds at most the
legacy 1 MiB of a claimed body, and answers a repeated Authorization line
as legacy RustFS answers an anonymous caller, never serving it as one.
The gateway selection no longer holds the legacy service: claimed routes go to the control-plane host, and a selection without one answers 501. Tests drive every request class through both selections and assert neither reaches the other stack, and compare the host with the legacy stack over real IAM and signatures.
The host dispatches every admin, table-catalog, profiling, STS form, replication, listen and Object Lambda request through S3Router::admit and the existing route table, with the legacy stack's identity, body ceiling and answers. Probe tests pin which requests reach a handler and as whom.
Design (T2.11): serve every route the admin router claims on the gateway
stack without the s3s service.
- Extension point: a RustFS-owned dialect on a second gateway service, the
control-plane host. One claimed operation, rustfs:ControlPlane, takes the
six RustFS claims (admin, MinIO alias, both table-catalog prefixes, both
profiling triggers) exactly, with a trailing slash and every descendant,
for every method; a RustFS form operation takes the STS form at /; the
eight query-discriminated extension and Object Lambda rows are the
gateway dialect's own S3-table operations. No gateway change is needed.
- Identity: the gateway verifies whatever is presented (floor admits
header, presigned and anonymous; the caller secret is handed to every
operation, as s3s hands it to every custom route) and the envelope is
built with RequestEnvelope::from_gateway, the mechanism the native admin
bridge already uses.
- Extracted here: S3Router::admit, check_access's rule over owned method,
URI, headers and "signed", and router::dispatch, the route-table answer.
The legacy S3Route impl now calls both; the console and Object Lambda
branches stay with the legacy call, and an envelope-based Object Lambda
entry is added for the gateway host.
The squash of #9489 carried two hunks of an unlanded POST change that call
post_effective_headers, which main does not define, so every build with the
gateway-stack feature failed. Read the request headers as before; the POST
change reapplies cleanly on top. Also drops trailing whitespace that fails
cargo fmt --check.
* fix(ecstore): admit degraded local startup at read quorum
Keep absent local volumes in configured offline slots and admit existing native formats with nonvoting blank replacements. Preserve legacy validation and elected migration authority before degraded reads. Add startup, migration, readiness and real S3 cold-start regressions.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): separate startup reads from metadata writers
Install committed startup metadata under a shared namespace fence when no writer work is required. Revalidate under the existing exclusive pipeline before bootstrap, recovery, repair, or topology side effects, and check fence validity at publication.
Cache existing-format read admission and avoid legacy scans below native read quorum for ineligible nonwriters. Cover shared-lock contention, authority bytes, released fences, and completed-process and cold-store retries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): separate legacy read compatibility from migration
Validate observed legacy layouts against an established native read quorum without requiring legacy migration quorum. Reuse known unavailable native slots to avoid repeated peer RPCs. Keep migration behind its original elected-writer, availability and strict-majority requirements, and grant no bootstrap authority to read-compatible outcomes.
Add full-loader regressions for blank plus unreachable or missing slots, both creator roles, conflicting evidence and unchanged authority files.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): route startup test through storage facade
Use the existing internal NamespaceLocking re-export in the startup regression, preserving the architecture boundary checked by CI. Production code and the trait identity are unchanged.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(iam): preserve virtual parent collision invariant
Keep the federated binding regression focused on colliding regular and STS policy mappings. Virtual OIDC parent keys are now intentionally reserved and cannot identify regular users; that invariant already has direct IAM coverage.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(gateway): project POST form metadata safely
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(gateway): preserve form authority across feature boundaries
Keep archive extraction decisions on projected POST form headers in gateway builds while preserving ordinary header handling without that feature. Update the checksum regression to model the signed form source instead of a forbidden wire object property.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Signed-off-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
The request facts trait, its accessors and the access-phase admission no longer
live in the legacy access hook file; they return the owned S3 error type.
Moves the rustfs/gateway pin to ab5242b0: under the legacy RustFS policy
readings a starts-with condition over a field the form does not carry is
read against the empty string, as the shipped server reads it.
The console listener now answers 404 with an empty body for every route
that is not a console or control-plane route (9cefecb04), so an
unauthenticated S3 root there is no longer a 403 from the S3 service.
The old expectation described the behaviour before that hardening.
Moves the rustfs/gateway pin to 6096b921 (dotted custom error codes, the
x-rustfs-error-cause header, completion checksum types) and maps the
cause a 503 carries onto the gateway's closed header member, so the
gateway stack answers 503 with its cause instead of a generic 500.
Moves the rustfs/gateway pin to 98cb70d1: on the RustFS profile an
unsigned browser-form policy is enforced as the shipped server enforces
it and the request stays anonymous.
Moves the rustfs/gateway pin to fb4d21fc: an empty DeleteObjects entry
ETag is carried per entry, and the RustFS profile reads aws-chunked
bodies as the shipped server does (one empty line before signed
trailers, legacy trailer bounds, XAmzContentSHA256Mismatch, legacy
framing refusal codes).
A use-case error raised with a code and no message reached the gateway
stack as an empty <Message>, where the legacy edge has always sent the
per-code default. The owned code type now carries that table, checked
row by row against the pinned s3s, and the one error edge applies it.
* fix(ecstore): reserve emergency space for delete journals
Keep bounded physical metadata headroom for recoverable deletion on Unix without bypassing quorum or rollback.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(ecstore): recover delete metadata space on demand
Share a pinned reserve owner per physical disk and keep healthy deletion free of reserve filesystem probes. Retry only disposable staging and idempotent metadata primitives after actual ENOSPC, preserving transaction publication and quorum boundaries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): retry concurrent full-disk deletes
Serialize ENOSPC waiters per physical disk and give each safe metadata primitive one bounded retry against shared released capacity.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ci): account for delete reserves in receipt fixture
Reject undersized tmpfs mounts after including the eight per-disk delete reserves and keep a self-test for the capacity boundary.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(heal): refresh resume admission fixture lease
Refresh the existing node admission sample immediately before starting resume GC so the cancellation test reaches the native-open ownership boundary.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): inject receipt ENOSPC on hardlink path
Keep the receipt fault at the atomic allocation boundary after the stage-two hardlink fast path landed, so reserve recovery remains covered.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Resolve multipart ownership from storage metadata and share authorization across both request edges. Preserve the existing legacy adapter while binding gateway claims to the recorded namespace.
* perf(ecstore): defer flat inline preflight and lazy-pin commit dirs
Eliminate redundant directory opens, ancestor prefix probes, and metadata stats on the Linux local-disk object commit path:
- Short-circuit validate_existing_local_disk_prefix_at on ENOENT for normalized relative paths under RESOLVE_BENEATH | RESOLVE_NO_SYMLINKS.
- Defer source directory pinning and new-destination fstat in RenameCommitGuard on flat inline commits.
- Defer destination volume preflight to the commit guard preparation step on flat inline commits while preserving VolumeNotFound/VolumeAccessDenied preflight rejection proofs.
- Stage rollback backups by linking the held predecessor file descriptor via /proc/self/fd/<fd> and extend hardlinked rollback staging to non-inline overwrites.
* fix(ecstore): sync linked predecessor metadata when sync_backup is enabled
---------
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Wire both admin aliases through AdminBridge and the existing owned ServerInfo authorization. Keep the business handler and gateway pin unchanged; add no API or instance endpoint.
Add three test entry points covering eight allowed and 80 refusal/fallback rows, both hosts and aliases, complete JSON/XML, response headers, and unread unsigned bodies with signed controls. Production diff: +12/-3 lines.
Baseline and mutation base: 94a138b994. The unmodified native-selection test failed as expected. One compiled cohort passed eight controls, then eight faults failed their intended assertions: authorization bypass, native selection fallback, JSON, content type, Content-Length, refusal XML, premature body polling, and premature handler entry.
Restored sources were hash-checked and actually recompiled on 0278e1cd0e: 31 scoped tests, fmt, both RustFS Clippy modes, script-tests and test wiring passed. Existing snapshot checks now accumulate wire failures before asserting.
Not verified: CI, socket end-to-end or the full workspace suite.
Validation: cargo fmt --all --check; both rustfs all-target Clippy modes with -D warnings; 31 scoped restored tests; make script-tests; test wiring. No CI, socket-level end-to-end run, or full-workspace suite was run.
One compiled fault cohort first passed eight controls. Authorization bypass, native-route fallback, corrupted JSON, content type, content length and refusal XML each failed native_admin_extensions_catalog_real_signature_iam_and_wire; route fallback also failed native_admin_selection_is_exact_and_host_independent. Premature body polling and handler entry each failed native_admin_extensions_catalog_unsigned_before_body. Temporary instrumentation was removed, exact hashes restored and touched, and the product actually recompiled.
Restored test and lint base: 0278e1cd0e. Existing snapshot wire assertions remain enforced through the shared failure collector.
Integration verification base: 913edbc536 with the Iceberg config increment retained. The final dialect registers ten operations and four claims. Twenty-six selected tests passed: fourteen native admin HTTP tests, four mounted admin fixture tests, seven original extension handler tests and the exact edge selector. Both all-target RustFS Clippy modes, formatting, script-tests, current test wiring and prepush guards passed. Source hashes matched after verification. No new assertions or business behavior were introduced during integration.
Route both config GET aliases through GetCatalogConfigHandler. Keep its owned IAM, session-claim and warehouse handling, with the shared Iceberg JSON error outlet. Only these exact GET paths use the native bridge.
The matrix covers 12 allowed and 52 refused rows across both aliases and hosts, including full JSON, temporary credentials, query ordering and observed handler entry. Pin early duplicate-query rejection and the native anonymous message explicitly. The legacy baseline ran on b84985286.
Seven faults made the IAM, table-token, warehouse-prefix, alias-selection, handler-counter, JSON-outlet and complete anonymous-message assertions fail. Each had a passing control with the same compiled source. Restore hashes and a real restored build were checked.
Validation on 0278e1cd0: 16 scoped tests, cargo fmt and RustFS Clippy with and without gateway-stack passed. make script-tests passed with unchanged scripts. Production diff: +18/-9, excluding test-only probes.
No catalog storage, credential vending, catalog commits or other Iceberg operations were migrated. Full workspace, TCP/external SDK e2e and CI were not run.
Route the protocol client and legacy adapter through one owned multipart
copy use case, preserving storage ownership, fallback context, completion
accounting, conditional order, XML ETags, and error messages and causes.
Share copy-source validation and retain the original 1024-byte key limit.
Validation: original-main fixtures, 23 focused runtime tests, 38 effective
behavior mutations, restored-source runtime, default and gateway-stack
all-target Clippy, script tests, and final integration check and prepush.
Reduce syscall and sync overhead on local-disk DELETE and PUT paths:
- Hardlink the Stage 1 delete-prepared regular file to delete-quorum-committed on the cached Stage 2 local publish path when Stage 1 synced the journal, avoiding a duplicate temp-file create, write, fdatasync, and rename per drive while retaining the staged wrapper fallback on conflict or durability escalation.
- Accept bare DeleteRecoveryJournal payloads as unfinished (finished = false) commit receipts in parse_commit_receipt while keeping delete-prepared validation strictly DeleteRecoveryJournal.
- Reuse validated io_get_bucket_and_object_path components when constructing the root-relative metadata lease key in delete_version_inner on Linux.
- Track live /proc/self/fd/<fd> PublicationRoot handles via Weak<File> in NATIVE_PUBLICATION_HISTORY so record_native_publication skips redundant statx calls on pinned uncollided procfs roots.
* feat(ecstore): align inline budgets and binary batch decoding
Use a fixed 128 KiB per-shard inline budget with versioned admission and
preserve historical configuration markers and persisted object layouts.
Decode binary delete batches independently of the legacy JSON list while
retaining JSON-only requests and dual-write senders. Reject malformed
binary entries before disk mutation and preallocate the selected batch.
Cover budget boundaries, layout coexistence, MinIO metadata fixtures,
binary-only batches and JSON compatibility. Document geometry and
rollback boundaries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): add isolated Docker inline geometry validation
Build clean-source Linux validation images from a frozen Git bundle.
Pin running image identities and binary hashes, and inspect persisted
object geometry through the existing filemeta decoder.
Provide an owned four-node Docker adapter for the existing ABBA runner.
Guard resource ownership, isolate loopback access, serialize state
mutations, and verify HEAD, full GET and Range contents.
Keep PUT content probes available through an isolated Linux mc adapter
when a host client cannot initialize. Cover ownership and failure paths
with script tests wired into the existing runner.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): reuse bounded verified inline bodies
Share the materialization contract between metadata pre-verification
and buffered inline GETs. Bound responses to 2 MiB and a limited frame
count, and reuse an already verified body within the selected snapshot.
Route proof-protected parts through the readers that bind PartProofReader.
Cover larger single-block bodies, allocation bounds and proof validation
after a shard's bitrot checksum has been recomputed.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(ecstore): support bounded multi-block inline objects
Keep the default EC block and accumulated shard budget while bounding inline frame storage and verified-body reuse. Preserve transformed and protected write admission and existing metadata formats.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): isolate inline transport comparison modes
Pin and verify both MessagePack-only gates for each Docker cell, preserve an explicit JSON compatibility cell and probe exact accumulated shard boundaries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): cover inline rollback and mixed-reader fleets
Add reusable compatibility fixtures for null and versioned objects, cross-block ranges, unfinished multipart uploads and batch version deletion. Record coordinator identity and per-version geometry, preserve retained-data manifests and archive manifests on dataset resets.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(ecstore): unify bounded inline read and write paths
Share checked frame decoding across metadata preverification and GET, resolve write admission once, and use one checked physical shard length for inline and disk writers. Preserve proof-bound readers and erasure recovery for damaged or missing shards.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(testing): persist inline compatibility mutation receipts
Save successful multipart and delete receipts before fallible content and geometry checks. Resume completed mutations through verification without repeating writes, and cover read failures, geometry failures, and command retries.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(gateway): isolate capability probes from multipart listings
Give successful capability probes their own buckets so CreateMultipartUpload does not change the exact two-upload pagination fixtures. Preserve all listing-boundary assertions on both HTTP stacks.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(rpc): honor fleet-confirmed codecs for batch deletion
Build DeleteVersions requests with one codec policy for the complete batch. Emit JSON compatibility fields by default and binary-only batches after both existing fleet gates pass. Cover request fields, canonical binding and actual remote sender, handler and disk deletion in both modes.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): verify inline shards through borrowed frames
Share borrowed frame verification across buffered GET, bitrot readers and deep inline healing. Validate exact physical framing before scanning memory slices. Cover short prefixes, legacy padded frames, damage and trailing data, and provide a reproducible manual ABBA kernel comparison.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ci): account for manual inline verification benchmark
Raise the ECStore ignored-test ceiling from 2 to 3 for the opt-in
ABBA comparison of borrowed and streaming bitrot verification.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): reject inexact inline shard framing
Validate the complete encoded length of every selected inline data shard
before decoding or caching a verified object body. Return to the erasure
reader on missing, truncated, or trailing payload bytes.
Extend decoder fixtures across single and multi-block geometry, legacy
padding, unhashed payloads, and explicit bitrot verification bypass. Cover
metadata early-stop rejection and GET recovery for trailing shard bytes.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* refactor(ecstore): share inline shard reader construction
Build owned-metadata and borrowed-metadata readers through one Send iterator-based factory. Preserve shard ordering, empty slots, bitrot settings and caller-bound integrity verification.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(rpc): move endpoint buffers into batch delete requests
Transfer the prepared endpoint String into the protobuf request and assert allocation identity across every batch codec mode. This removes the intermediate endpoint copy during request construction.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(gateway): remove superseded pagination isolation
Use the upstream capability probes that clean up their own multipart sessions. Run probes against the seeded pagination bucket while keeping all exact page and cursor assertions.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(table-catalog): recognize borrowed multipart guard calls
Count owned and borrowed bucket/key guard forms while requiring all four production calls. Cover mixed split-file calls and reject wrong resources, missing error propagation and test-only mentions.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): size heal cleanup fixtures above inline budgets
Use an environment-independent per-pool fixture policy and payload sizes above the aggregate inline budget. Assert external placement before pausing old-data cleanup, rebuilding the committed generation and checking physical shards and the final payload.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(table-catalog): count borrowed object metadata guards
Recognize the borrowed bucket/key guards in migrated legal-hold and retention entrypoints. Validate two object and two key guards and cover incorrect resources, missing propagation and test-only mentions.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Register GET /{rustfs,minio}/admin/v4/cluster/snapshot with the existing owned handler and ServerInfo authorization. The read-only use case is unchanged.
Reuse the admin fixture for full JSON and refusal XML comparisons, response headers, exact route selection, and unsigned rejection before reading a body. The native matrix covers 8 allowed and 80 refusal or fallback rows; the body observer adds four signed controls and four unsigned refusals. Update the existing registration census.
Validation on b84985286: 35 scoped tests, RustFS Clippy with and without gateway-stack, cargo fmt, and make script-tests passed. Full workspace, distributed e2e, and CI were not run.
Mutations: IAM bypass, route removal, JSON replacement, and event-time corruption turned the signature/IAM/wire contract red. Reading the unsigned body turned the body observer red. Content-Type, Content-Length, and an extra XML Resource node each turned the corresponding wire assertion red. A temporary entry counter observed signed calls and no unsigned handler entry.
Production diff: +12/-2. No new public API or business logic.
* fix(targets): decode Kafka notification record keys
Build Kafka records from the decoded object identity so record keys match
the notification envelope for immediate delivery and persisted replay.
Cover form encoding boundaries, historical queue round trips, and early
rejection of invalid UTF-8 metadata.
Fixes#9437
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(targets): share allocation-efficient event key construction
Use a borrowed form decoder and exact-capacity key buffer for notification
envelopes and Kafka records. Reuse the established percent decoder and
preserve the owned public decoder API and persisted replay metadata.
Add exhaustive malformed-escape and UTF-8 compatibility checks, plus a
regression for borrowing plain object names.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Route the protocol client through its installed multipart context and owned
values. Preserve request headers, response and error projection, counting,
and audit completion. UploadId keeps one scalar compatibility projection.
UploadPartCopy, PostObject, gateway handlers and ownership rules are unchanged.
On f68ef7d5f: fmt, both all-targets Clippy modes, 37 scoped tests, and script-tests
passed. The 14-fault cohort had a green 37-test control; restored sources were
hash-checked, touched and recompiled before the final 37-test pass. On 489316e7a:
gateway-stack all-targets check and prepush-quick passed after rebase.
New runtime cases: 13 negative, 2 positive. Projection matrices cover 60 input,
64 output and 6 error rows. Non-test lines: +122/-20. No existing test was
deleted, weakened or ignored.
Effective mutations and failing tests (under protocols::client::multipart::
tests::upload_part_tests):
- part-number, length, md5, sse, eager-body, metric, audit:
upload_part_refusals_match_original_without_persisting_parts
- checksum: upload_part_input_projection_matches_original_fields
- output-field, etag-order:
upload_part_output_projection_matches_original_fields_and_refusals
- error-default, error-explicit:
upload_part_error_projection_matches_original_defaults
- ambient, observer: upload_part_client_preserves_stored_bytes_and_bound_context
Not run: full workspace, protocol wire lanes, released-binary differential,
live KMS/SSE integration, or CI.
Replace the protocol client compatibility dispatch with owned request and
response projections while preserving source validation, conditions, dates,
ETags, error answers, bound storage, fallback behavior, and operation counts.
Validated against the existing client and library behavior on f68ef7d5.
Final gateway-feature tests passed 11/11, including existing PutObject
regressions; default-mode tests passed 6/6. Both all-target Clippy modes,
script tests, wiring checks, and static preflight passed.
Twenty-two effective mutations covered observation controls, operation
counts, context selection, storage effects, source and condition parsing,
optional fields, dates, output fields, error facts, and request credentials.
Restored sources were rebuilt before the final passing controls.
This does not register UploadPartCopy or change the default S3 stack.
External migration lanes and release-reference testing remain outstanding.
Route CreateMultipartUpload, CompleteMultipartUpload and AbortMultipartUpload through the installed server's multipart use case. Keep the measured protocol projections and operation counts.
The upload-id scalar compatibility helper remains in Complete and Abort. UploadPart, UploadPartCopy, PostObject and persisted-owner work are outside this change.
Validation: 11 new tests; the runtime contract has 8 refusal cases and 2 successful flows. The restored selection passed 59/59 on d3abf8023. Both Clippy modes, fmt, script-tests, test wiring and prepush-quick passed. Non-test diff: +231/-42. The original client baseline ran on a98bd9028.
Effective mutations (38), grouped by the test that failed:
- multipart_create_projection_matches_original_fields_and_times: create-input-name, create-input-metadata, create-input-tagging, create-input-storage, create-input-sse, create-input-kms, create-input-md5, create-input-mode, create-input-hold, create-input-date, timestamp.
- multipart_refusals_match_original_client_errors: complete-error-message.
- complete_input_preserves_part_fields: legacy-part-checksum.
- multipart_create_projection_preserves_refusals: create-input-refusal.
- multipart_create_output_matches_original_for_stored_names_and_empty_values: create-output-name, create-output-strings.
- multipart_complete_projection_matches_original_parts_and_conditions: complete-condition, complete-parts, complete-part-number, complete-part-etag, complete-part-checksum, complete-condition-refusal.
- multipart_completion_projection_preserves_original_escaped_tags: complete-output-escape, complete-output-weak.
- multipart_completion_projection_preserves_header_only_field_behavior: complete-output-headerdrop, complete-output-header-validation.
- protocol_multipart_lifecycle_stores_parts_and_aborts: count-create, count-complete, count-abort, complete-location, complete-storage.
- multipart_uses_bound_store_with_a_foreign_ambient_context: create-storage, abort-storage, bound-store.
- multipart_envelopes_preserve_original_request_facts: request-facts.
- protocol_policy_denials_and_request_conditions: permission-create, permission-complete, permission-abort.
The final restored run had no leaky summary; an earlier control marked one pure projection test leaky. The linker reported the non-failing __eh_frame warning. The ambient fault's test exited 100 with target=false/ambient=true; its wrapper exited 1 because it expected generic assertion wording.
Not verified: CI, network protocol suites and the released-reference comparison.
Call the existing bucket use case directly from the protocol client. Preserve
bucket-name materialization, response facts, edge counts and bound or fallback
store selection. Keep legacy DTO imports confined to tests.
Tests: one new runtime matrix, with seven rejection and four success rows,
measured first against main at 70022e51c. Restored gateway bucket tests passed 4/4.
The old dispatch failed the source wiring guard; owned dispatch passed it.
Mutation checks: normal controls passed; the runtime matrix rejected storage
bypass, missing fallback, metric loss, ambient context selection, strict names,
and changed error code, message, status or headers. Isolated storage, fallback
and ambient-context faults retained normal operation counts. Restored sources
were touched and actually recompiled before the runtime pass.
Validation: fmt, package Clippy in both feature modes, script-tests and test
wiring. Production diff: +19/-14 lines. No new API or storage use case.
Not verified: CI, full workspace tests or live protocol end-to-end tests.
Use the bucket use case for ListObjectsV2 and both bucket listing entry points. Keep entry encoding, timestamps, ETags and refreshed session facts while removing three legacy FS calls. Other protocol operations are outside this increment. Non-test diff: +102/-82.
Added six tests: projection rows have 34 refusals and six accepted values; runtime cases have five refusals and eight successes, plus bucket exclusions and four credential rows. Existing assertions were retained.
Validation: baseline 2fea17d57 (2/2); restored build on a98bd9028 (15/15); all-target Clippy default and gateway-stack; fmt, script-tests, test wiring and prepush-quick. Rebased onto 88515bb7d with no task-file or pin overlap; all task blobs match the tested source.
Eight independent controls and 31 intended mutation failures:
- protocol_listing_output_matches_legacy_projection: strict Name, oversized key, invalid/missing ETag, XML escaping, weak tag, prefix, marker, encoding, timestamp.
- protocol_listing_bucket_projection_preserves_strict_names_and_milliseconds: bucket filtering, timestamp.
- protocol_listing_pages_and_encoding: cursor, count, encoding.
- protocol_listing_refusals_and_limits: empty/unknown credentials, counts.
- protocol_listing_bucket_context_and_defaults: count, bound context.
- protocol_listing_session_credential_projection_matches_legacy: token, secret.
- protocol_session_bucket_listing_revalidates_the_session_key: request context, IP, secure transport, headers, refresh, accepted count, refusal count, store context.
- request_extensions_preserve_authenticated_identity_and_source_ip: owner.
Experiments were removed, hashes checked and the restored product actually recompiled. Full protocol listing E2E and CI were not run.
Register data usage, plugin catalog and module-switch GET reads through
the existing AdminBridge and handlers under both admin aliases. Keep
neighboring methods and object-lambda routing on their existing paths.
Validation on 65057691: unchanged-production legacy baseline passed;
restored-source scoped tests passed 78/78. The new native HTTP matrix
covers 28 success and 236 refusal or routing-boundary rows. Exact replies
are pinned for both aliases and ordinary and bucket Hosts.
Three independent no-fault controls and 21 effective mutations passed
in one compiled cohort: selector removal/widening/lambda, each handler
binding, each IAM gate and action, both narrowed data-usage any-of gates,
signature verification, lambda dispatch, response bytes/status/request
id/content type and Keystone precedence. Exact refusal observations also
caught the disabled-key signature mutation. No existing assertion was
removed or weakened.
Gateway and default all-targets Clippy, script tests, test wiring and the
local prepush guards passed. No gateway pin or API changed.
Not verified: production listeners and full middleware, session
credentials, non-default persisted usage/module-switch data, full
workspace tests or CI.
Call the existing bucket use cases directly from the protocol client. Preserve root lookups, bucket validation, request context, response facts and operation counts. Other protocol operations stay as they are.
Non-test lines: +33/-40. Added cases: 17 refusals, 16 successes; reused three HeadBucket policy refusals. Protocol tests passed 39/39 in default and gateway-stack builds. Both rustfs all-target Clippy modes and make script-tests passed.
Four no-fault controls passed; 22 faulted test runs failed as intended. Mutations covered input routing, name refusals, output and error facts, counters, deletion, context resolution and authorization allow/deny. The force-delete fault also changed the observed bucket/object state. The raw HeadBucket NUL-name projection went red before its response text was restored.
Tests and Clippy ran on 2fea17d57. Script-tests ran on 2ca689f48; their sources are unchanged. Rebased onto 65057691 with unchanged client and gateway-pin blobs. Network transport e2e, workspace tests and CI were not run.
Serve the storage info, runtime capabilities and object cache statistics
GET aliases through the native admin service. Call the existing full IAM
gates and owned handlers, preserve raw request facts and keep the Keystone
guard first.
Add two contract matrices (42 allowed and 168 refused rows), with expanded
selector, registry, envelope and readiness coverage. On 2fea17d57d, the
restored source passed 72 scoped tests, fmt and both rustfs all-targets
Clippy modes. Script tests and test wiring also passed.
29 effective fault runs cover selection, lambda precedence, all three
dispatch/action/authorization bindings, signature verification, source IP,
raw URI/query, request context, readiness, response bytes/status/headers/
length and the registry. Nine controls ran in separate processes against
the same binary before those faults.
Not verified: live listeners and full production middleware, session
credentials, active cache statistics, CI or the full workspace tests.
Pair a single-use Keystone proof with sanitized owned authorization facts.
Preserve the original session-presence fact for policy principal projection,
and scope legacy credentials during both service call construction and polling.
Bind the gateway host-token principal to that owned identity without an IAM
credential or task-local fallback.
Initialize Keystone before gateway HTTP assembly and reuse the provider for
listeners and later auth integration setup. Refuse token-bearing claimed
non-S3 requests before console, admin or legacy dispatch.
Add 14 test functions. The primary ListBuckets/HeadBucket matrix has 13 rejected
and 7 allowed requests. Change enabled-Keystone startup to succeed after provider
initialization; retain both configuration tests, including disabled and invalid
settings. Production changes: +304/-77 lines, excluding test bodies.
Mutation checks (20 effective boundaries; each has a green control):
- owner, groups, username: keystone_http_tokens_authorize_real_s3_by_roles_groups_and_username
- pair-name: keystone_envelope_refuses_missing_and_mismatched_owned_identity
- provider, expiry: keystone_bridge_refuses_provider_mismatch_and_post_validation_expiry
- stale-established, stale-owned: keystone_stack_clears_both_payloads_before_a_signed_request
- legacy-before-deny, native-before-deny, admin-before-deny: gateway_keystone_tokens_are_refused_before_non_s3_legacy_dispatch
- scope: disabled_middleware_clears_identity_before_inner_call_and_poll
- principal-session: resource_free_conditions_preserve_legacy_projection_and_erased_keystone_session_facts
- secret, session, session-fact, replay, poison: request_identity_erases_secrets_and_consumes_its_proof_once
- repeat-init, missing-child: keystone_initialization_reuses_the_provider_for_concurrent_calls
Verification on 2ca689f: 214 focused tests passed after restoring and rebuilding
the production sources; all 33 Keystone package tests passed. Both package-scoped
all-target Clippy configurations, formatting, source guards, script tests and
prepush checks passed. Temporary fault code was removed.
No gateway API, dependency pin or PostObject changes. A deployed Keystone server,
the complete listener token lane and CI were not exercised locally.
Project protocol PutObject directly into the owned write input and project the answer back without the legacy DTO path. Keep the measured normalization, refusals, error facts, server context and operation counts at the client edge.
Non-test lines: +196/-18. Eight added tests include 25 runtime cases (18 negative, 7 positive).
Verified on f4266a4576 with gateway pin 44f9a2422d745ffba952347ec91b0332ef2667a4: protocol tests 36/36 in default and gateway-stack builds; both all-target Clippy builds; script-tests; prepush-quick.
Sixteen runtime mutations failed their intended tests from one fixed binary after all eight controls passed:
- empty: protocol_put_optional_values_match_legacy
- condition, specific-none: protocol_put_condition_grammar_matches_legacy
- input-checksum: protocol_put_checksum_input_matches_legacy
- retain-nanos, retain-range: protocol_put_retain_until_matches_legacy
- output-etag, output-fields, output-checksum: protocol_put_output_matches_legacy
- error-default, error-facts: protocol_put_error_projection_matches_legacy
- event-hold, event-days, event-years, body, metrics: protocol_put_runtime_matches_legacy
The experimental code was removed and the restored implementation was recompiled and tested in both builds. The earlier incorrect metric lookup is not counted as evidence.
Scope is protocol PutObject. Network protocol E2E, the full workspace and CI were not run.
Serve GET /rustfs/admin/v3/info and /minio/admin/v3/info through a
scoped native service using the existing signature verifier and the real
ServerInfoHandler IAM gate. Keep object-lambda routing ahead of these
aliases and retain the raw URI, optional ReqInfo, headers and body.
The pinned RustFS profile already handles claims on bucket-style hosts.
Outside tests and the generated lockfile: +180/-14 lines. Add seven tests,
including 32 authorization refusals and 16 authorized info responses, both
SourceIp directions and signed legacy-service comparisons. No existing
assertion was weakened. Duplicate-query signing is tested as a fixture
refusal, with routing coverage retained separately.
Validation on f4266a4576: fmt, both rustfs
Clippy modes, 42 scoped tests, script-tests and prepush-quick.
Twenty-four mutation runs failed as intended across 22 faults:
- native_admin_selection_is_exact_and_host_independent: remove/widen
selection and lose object-lambda priority.
- native_admin_real_iam_and_legacy_contract: bypass signature verification
or IAM, change the action or source IP, omit pools, rewrite the URI,
or lose object-lambda priority.
- native_admin_envelope_preserves_raw_alias_host_facts_and_optional_req_info:
rewrite the URI, drop/default ReqInfo, or drop client, peer or request ID.
- native_admin_complete_response_keeps_bytes_status_and_content_type:
corrupt bytes, status, content type, extra headers or content length.
- native_admin_authenticated_request_refuses_an_uninstalled_server_context:
remove the readiness check.
- native_admin_registers_one_operation_and_both_claims: register an extra op.
- native_admin_signing_fixture_refuses_duplicate_query: accept duplicate keys.
The same mutation binary passed all seven controls before fault runs;
the restored production tree was then rebuilt and tested.
Not exercised: network listeners, session credentials, the combined
Keystone change, CI or other admin endpoints.
* fix(rpc): scope canary errors to grpc failures
Exclude expected read-version remote responses without hiding transport, gRPC status, response-decode, or other gRPC operation failures.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(rpc): verify canary revisions from image history
Use immutable image history only when recognized config labels are absent, keep mismatches fail-closed, and record the provenance source in verifier output.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(audit): restore bucket config audits and metadata guards
Audit accelerate, request-payment, and website configuration mutations through the shared owned request scope, including failures and the website deletion status.
Validate the replication mutation delegation before checking peer reload notifications. Count borrowed reserved-prefix guard calls and cover missing production calls, test-only mentions, audit completion, and stale bucket incarnations.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: heihutu <heihutu@gmail.com>
Route both GetObject calls, HeadObject and DeleteObject to the owned use cases. Keep the request facts and millisecond timestamp behavior. PutObject stays unchanged; 12 operations and 13 trait calls remain.
The client edge is an interface in the layer guard. Its public re-export is covered too, and app-to-client imports are rejected by fixtures.
Runtime wiring: +177/-101 non-test lines. The new matrix has 18 negative and 13 positive operation cases, plus the extended identity-copy control.
Validation: 28 protocol tests passed in both default and gateway-stack modes; both all-target Clippy modes passed. Script tests, layer controls and focused architecture/footprint/test guards passed. Five source faults failed at the intended claims, range, Head ETag, deletion-witness and version assertions. The precision oracles failed before the millisecond projection was added.
Runtime and Clippy ran on e9da1d309; initial controls and faults ran on 2308dee4b2. Rebase to 00ecde125 changed none of the seven task files or gateway pins. CI and HTTP transport were not checked.
Use the existing console router when the gateway console is enabled. Keep lambda and extension precedence, the legacy selection, and outer middleware assembly unchanged. The common body conversion stays at the edge.
Add test-only assets and one contract with 10 native and 52 excluded routing probes. Non-test source: +89/-16. The restored run passed 22 console/stack tests on e9da1d309; both Clippy modes, script-tests and prepush-quick passed.
native_console_route_contract went red for three independent mutations: remove the native branch (service-call counts), widen the shared prefix (neighboring S3 path), and route every claim to console (anonymous admin refusal). Restoring the sources triggered a real product recompile.
Full outer HTTP wire checks and a production UI bundle were not tested. Admin, STS and website migration remain separate work.
Share the batch deletion engine between legacy and native edges with owned inputs and results. Keep exact per-entry authorization, version and retention handling, ordered errors, quiet responses, metrics, and audit aggregation. Preserve frozen resource resolution and rejected-key echoes.
On 2308dee4 with gateway 44f9a242, the focused suite passed 208 tests before and after deliberate mutations. Both rustfs Clippy configurations, script tests, test wiring, formatting, and prepush guards passed. Four added runtime tests cover mixed successes and per-entry refusals, frozen fields, and rejected-key state.
Five targeted tests failed when batch target clearing, denial error mapping, and raw-key echo were changed. Sources were restored byte for byte and product artifacts recompiled.
The legacy edge matched 62 observed baseline responses including all headers, XML and object states. Native decoder and expected-owner differences are tracked separately. Actual webhook records matched for mixed and quiet requests across the baseline and both candidate stacks.
Full workspace tests and CI were not run. Verification is scoped to this migration increment.
Use the validated request offset and full timestamp precision when projecting PutObject and PutObjectRetention dates into authorization and storage.
Signed requests verify exact stored dates and version isolation for positive and negative offsets and UTC. Policy tests cover denied dates and the typed date supplied by PutObject authorization.
On b2b4f0c4, 175 focused tests and six raw xl.meta checks passed. The UTC-only control and five targeted mutations failed at their intended assertions. Both Clippy feature configurations passed.
Share GetObject authorization and the existing Select query producer across both stacks. Carry live events through the typed response with the projected SSE headers. The producer retains its single deadline, snapshot checks, bounded channel and receiver cancellation.
On c5b4a8577, the restored build passed 207 focused tests, both RustFS Clippy feature modes, formatting, script tests and test wiring. Signed socket probes matched all 17 legacy cases and 12 gateway cases. Five gateway refusals omit the legacy default message, tracked in rustfs/backlog#2684.
The fault build passed all 98 controls. Bypassing authorization failed on both stacks. Removing receiver-close handling, dropping the terminal Records permit, skipping the Stats fence, replacing an error with End, and dropping progress or scan range each failed the corresponding test.
Verification used local stores and SSE-C. The full workspace suite and external KMS were outside the local run.
Share the authorization snapshot and restore admission between both stacks.
Preserve HTTP 200 for both success paths and emit ObjectRestorePost on new
admission only.
Verified on c0763a43 with 114 focused tests, four serialized ILM tests, and
16 signed wire responses per stack. Faults covered shared authorization,
generation capture and admission, SELECT rejection, worker parameters and
liveness, and both audit and event paths. Cluster lock loss and mixed-version
rollout remain unverified.
Share each operation's authorization and metadata write with the legacy edge.
Keep their request ordering, version and bucket-incarnation fences, replication
completion, and notification suppression. Retention checks the locked metadata
again before committing a change.
The two stacks were exercised through signed HTTP requests and independent
disk metadata reads. Faults in authorization, body projection, version
selection, counting, auditing, notification suppression, scanner invalidation,
the bucket fence, and the commit-time retention check reached their assertions.
Share the bucket Object Lock write between the legacy and gateway edges. Keep lock configuration and versioning as sequential writes against the authorized bucket incarnation, followed by peer reload, site replication and scanner invalidation.
Cover eight refusal or failure cases and three successful cases with durable metadata and signed requests. The two stacks run the same request cases and refusal matrix.
The mutation run detected both missing write fences, swallowed peer failure, propagated site failure, early or absent scanner invalidation, missing audit, wrong authorization action or resource, dropped request body and incorrect operation counting.
Validation used debug builds on d461908bf. The final lint pass elides an equivalent lifetime in a test helper. Peer and site failures were injected locally, with real multi-site delivery left unverified.
Route PutBucketReplication and DeleteBucketReplication through the owned bucket use case. Share site checks, metadata fencing, target cleanup recovery, and audit completion with the legacy edge.
Signed requests exercise 28 refusals and six accepted edits across both stacks. The direct storage tests cover six failure paths and two successful edits. Twenty-four faults turned their expected disk, authorization, locking, callback, audit, or metric assertions red.
The restored gateway-stack build passed 132 selected tests on 75b293f09, including both HTTP stacks. Both Clippy variants and the mutation cohort passed on fb3e2818c. The fixed legacy CLI matched all six response records. The standalone default runtime suite, multi-site delivery, and CI were unverified.
Share the owned write paths across both S3 stacks. Preserve the policy
document bytes, default KMS key resolution, bucket tag validation, and
incarnation fences before reload and replication callbacks.
Add three successful writes and three rejected stale writes on disk.
Extend the two-stack refusal matrix with six successful and 24 denied
requests. Cover the encryption and tag validation order before lookup.
The fault cohort exercised the action and resource checks, value
validation and order, raw policy bytes, default KMS readback, legacy
policy count, durable writes, incarnation fences, reload, replication,
audit, and scanner invalidation. Each selected assertion failed.
Local checks used base 75b293f09. Fixed CLI comparisons covered legacy
responses, audit entries, and operation counts. Live peer replication,
external KMS providers, and CI were outside the local checks.
Share the three generation-fenced deletes across both S3 stacks. Keep
their existing IAM actions and use the shared IAM scope for tag deletion.
Add six focused tests covering 21 refusals and nine successes, and add the
three operations to the refusal matrix. Substituting IAM actions and
buckets, removing the tagging scope, and suppressing the gateway counter
fail the authorization and metrics checks. The storage tests detect a
lost fence, a skipped write, missing reload or replication calls, omitted
scanner invalidation, and a changed audit status.
Verified on 4294c41cc with scoped nextest, both Clippy modes, script tests,
quick checks, and local CLI comparisons. Peer network delivery was
outside the local checks.
Route PutBucketAcl and PutBucketLogging through shared bucket use cases.
Preserve the ACL response for header-only requests and the bucket lookup
before the XML policy refusal. Write logging configuration using the
authorized bucket incarnation and the existing persistence format.
Verify 111 focused tests on 4294c41cc, including the storage access suite,
and run both Clippy modes, script tests, and local wire comparisons. The
wire matrix exercises 15 refusal cases and seven successful writes on
each stack.
Change both IAM actions and resources, audit statuses, and counters in
the fault cohort. Reverse ACL lookup and XML policy checks, drop policy
presence, corrupt logging bytes, reverse logging conversion order, and
remove the incarnation guard. The regressions detect each fault, and
the stale-authorization test reads the replacement bucket from disk.
Route Get, Put, and DeletePublicAccessBlock through shared bucket use
cases. Preserve the persisted switch values, mutation incarnation fence,
reload behavior, audit status, and missing-configuration response.
Add six focused tests covering 25 refusal cases and 17 success cases
across both stacks and storage. Extend the refusal and counter matrix
for all three operations.
Substitute each IAM action and bucket, corrupt each operation's value,
change the missing-config status, and suppress each edge counter. The
round-trip and matrix tests reject those faults. Put and Delete tests
reject a missing incarnation fence, the wrong reload mode, and wrong
audit status. Read the durable replacement-bucket bytes after disabling
both fences.
Verify on 92050cdca with scoped nextest, both Clippy modes, script tests,
and local wire tests. Peer reload delivery was outside these local tests.
Serve accelerate, request-payment and website writes, including website
deletion, through shared use cases. Both S3 edges enforce the bucket
policy and the metadata incarnation fence before changing stored data.
Verified on 92050cdca with formatting, Clippy on both RustFS feature
sets, script tests, 21 RustFS tests and 27 operation and metrics tests.
The fixed legacy CLI supplied 42 HTTP comparison cases per stack.
The wire assertions caught altered IAM actions and resources, missing
denial audits and operation counters, and skipped website validation.
The stale-incarnation test caught changes to the replacement bucket's
disk bytes. The lookup-order test caught early configuration conversion.
Refs rustfs/backlog#2734
* fix(metrics): label grouped fdatasync batches accurately
Record the serialized user-space fdatasync coordinator as grouped and reserve parallel for independent per-file fanout. This keeps performance dashboards from conflating two different dispatch models.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): separate grouping from timeout race
Keep the same-disk batching test focused on queue aggregation. Claimed-follower timeout ownership remains covered by its dedicated deterministic regression, avoiding a valid pre-claim timeout race in the batching fixture.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(table-catalog): accept borrowed multipart guard calls
Count both owned String and borrowed &str spellings of the same reserved-prefix guard. UploadPart now obtains borrowed bucket and key values from its typed target, while the production guard remains in place.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* perf(grpc): attribute rebuilds and bound bulk responses
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(grpc): attribute rebuild success after publication
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(obs): add exact HTTP/2 ping timeout diagnostics
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(multipart): run refusal matrix on large stack
Run the real-store completion refusal matrix through the shared 32 MiB test harness so its deep async storage future does not overflow libtest's default stack.
Keep the original test name and all refusal-order assertions intact.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): pin nixl-sys workspace source
Manage the nixl-sys Git revision from the workspace dependency table and point the optional Linux transport dependency at houseme/nixl commit cc636c83f13d692e85b67e55aed092413d16fb41.
Allow the reviewed source in cargo-deny and refresh the lockfile, replacing the unmaintained bincode dependency with the fork's wincode graph.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): authenticate msgpack peer capability
Add an optional boot-epoch-bound HMAC capability proof and cache the verified per-peer observation without enabling any msgpack send policy.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(grpc): bind peer capability to connection generations (#9433)
* feat(grpc): track physical connection generations
Observe every tonic physical reconnect through a stable custom connector while preserving existing TCP, TLS, HTTP/2, cache, and public channel behavior.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): bind msgpack capability to connections
Scope authenticated msgpack observations to channel identity and physical connection generation so transparent reconnects require a fresh proof without enabling the send policy.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): guard stale generations before dispatch
Reject generation-bound requests before inner transport call or first payload frame when tonic readiness observes a different physical connection, while leaving ordinary mutations unguarded until the send-policy follow-up.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): add per-peer msgpack rollout gate
Add the default-off peer-capability environment gate, cached evaluation, fixed-cardinality send-decision metrics, and rollout constraints for stable peer-affine connections.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): apply per-peer msgpack send policy
Capture one capability decision per eligible RPC, bind peer-mode requests to boot and connection generations, and rebuild at most one dual-write request only after a locally proven pre-dispatch rejection.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(rpc): verify msgpack peer canary evidence
Add a strict three-phase four-node evidence verifier with raw Prometheus and workload receipts, adversarial tests, script-test wiring, and the operational manifest contract.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(rpc): align batch read manifest encoder
Match the BatchReadVersion compatibility manifest to the request-owned encoder expression used by the production send path.
Restore the owning ECStore source guard while preserving wire and runtime behavior.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(rpc): orchestrate msgpack peer canary
Run the fixed mixed/all-new/rollback four-node matrix with prebuilt images, real workload and readback, raw Prometheus capture, strict manifest generation, and adversarial fake integration tests.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(rpc): verify canary image and telemetry identities
* test(rpc): bind canary evidence provenance
Scope canary metrics to one injected cluster identity and bind candidate, baseline, and per-phase running containers to immutable image IDs and exact build revisions.
Reject foreign-cluster metrics, stale revision labels, same-image tags, and phase image mismatches.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(table-catalog): accept borrowed multipart guard calls
Count the exact borrowed bucket/key guard call introduced by UploadPart target ownership while preserving the four-production-call contract.
Cover the borrowed spelling in both the positive fixture and the test-only false-positive regression.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
Share XML tag authorization and storage execution across both stacks.
Preserve the requested version, replication-target proxy, and metadata
completion order.
The dual-stack tests exercise 37 refusal and 13 success scenarios.
The restored integration run passed 148 tests on 26db9b19a, and the
proxy cleanup verification passed 134 run, 134 passed.
Both feature configurations passed Clippy, and script tests passed.
Fault injection caught native and shared authorization bypasses,
missing XML facts, and incorrect action, resource and tag key facts.
It also caught duplicate counting, incorrect persisted tags, missing
or duplicate success events, and event or dirty publication on a miss.
Live replication targets and ECStore write faults remain unverified.
Serve bucket acceleration, request payment, website, and logging
configuration through shared persisted read paths. Keep each operation's
existing authorization and legacy response projection. Append distinct
metric labels without shifting existing indexes.
The scoped RustFS, S3 operation, and metrics suite passed 283 tests on
993464fbb. The integrated configuration and refusal suites passed 21
tests on 292974baf. Both feature modes passed all-targets Clippy.
Standalone checks compared 23 successful and 17 refused legacy requests
against cfdd4b268 and exercised the gateway answers on the same data.
Action, resource, anonymous, projection, default, missing-bucket, counter,
and audit faults failed their original assertions. Metric registry tests
also detected duplicate labels, changed index order, and an added event.
Verification is scoped to these local suites and wire probes.
Share bucket-scoped authorization and persisted configuration reads across
both stacks. Carry the stored configurations in gateway responses and
preserve the operation-specific errors for missing configs.
On RustFS 993464fbb, 120 scoped tests passed, including both refusal
matrices and six new tests with 24 refusal and 12 success cases.
Live HTTP checks covered response documents, operation counts and
authorization-denial audit records. Both feature configurations passed
Clippy, and formatting, script tests and source guards passed.
Changing each IAM action or resource admitted a forbidden read.
Duplicating each edge count and changing each stored output failed its
test. Returning 404 for missing encryption failed the 400 assertion.
Suppressing gateway denial audit removed all nine expected records.
Runtime verification used single-node debug servers.
Share the read use case and both IAM decisions across the legacy and
gateway handlers. Keep attribute selection, stored metadata and
pagination in the use case, and encode the result at each edge.
The 6f93ac5f control matched 55 legacy wire cases and the restored
sources passed 139 scoped tests. Both stacks exercised 59 signed
requests, including 31 legacy refusals and 32 gateway refusals.
Seventeen injected faults each turned a targeted assertion red. They
cover the four IAM actions, resource and version binding, empty-version
selection, handler authorization, SSE-C, selection, both checksum paths,
paging, ETag, Last-Modified, counting and notification suppression.
Share one owned write path across the gateway and legacy edges. Project
runtime destinations at each edge and defer consumption of the persisted
conversion result until after filter validation. Keep IAM scope, the
incarnation fence, and the existing validate, write, reload, clear, and
add order. Count the request at its edge and audit it in the use case.
Add three refusal tests and four tests that exercise success and failure. The legacy HTTP baseline passed on 97a7639f. On 6f93ac5f the
38-test control passed. Six fault injections exposed wrong IAM action,
wrong IAM resource, a missing incarnation fence, duplicate counting,
the wrong audit status, and missing reload callbacks. The first three
changed the stored bytes guarded by their refusal tests.
The restored tree rebuilt and passed all 38 scoped tests. Both package
Clippy configurations, script tests, test wiring, and prepush passed.
Cross-node reload delivery and remote audit sink delivery were outside
the local test scope.
Use the same authorization and audited use case on both S3 stacks. Bind
the gateway claim to the owner selected under the upload write lock
before staged parts can be removed. Preserve the existing generation,
lifecycle and quorum checks.
Verified the fixed legacy baseline, the integrated native wire flow, 212
focused tests and both Clippy modes. Fault checks exercised owner
selection, deletion and orphan handling, scoped IAM, generation
transport, audit, operation counts and dirty usage.
Audit delivery and separate fault injection of the existing final
lock-loss and metadata-incarnation fences were outside this verification.
Resolve the source from the gateway read proof. Share source and
destination authorization, tag checks, and the existing storage copy
between both S3 stacks.
Checked the legacy wire baseline, both CopyObject wire contracts, and the
access and refusal suites. Nine temporary faults triggered the intended
assertions. The restored build passed seven focused tests with gateway
75757292, and Clippy passed with and without gateway-stack.
Seed a lifecycle configuration so the admitted request removes real state.
Verified the matrix census and both refusal matrices in the CopyObject development checkout on 93947f22c.
Share authorization and pagination across both S3 edges. Resolve the
native upload claim using the owner from the same quorum-selected
metadata as the parts page. Preserve typed storage errors and write
the page through each edge's response projection.
The scoped suite includes all 98 storage access tests, real upload
sessions, stored-owner combinations, both wire paths, and the storage
API. Twenty-three fault modes exercised the owner, authorization,
lookup, error, counter, and projection assertions.
Validated 168 focused tests after restoring and recompiling the candidate
on c2b5fbb plus the isolated fixture cleanup. The owner matrix covers
three positive and six negative cases; each wire IAM matrix covers one
positive and seven negative cases. Both feature configurations passed
Clippy. Full migration acceptance lanes remain pending.
Abort the session returned by the successful matrix call through the
fixture store so later pagination assertions see their own sessions.
Both listing boundary tests failed on c2b5fbb and passed with the
fixture cleanup. Both refusal matrices passed with the same cleanup.
Share the incarnation-fenced lifecycle deletion across both edges, preserving reload and site-hook ordering and one audit record.
Validated 37 focused tests on 77da63397, both all-target Clippy configurations, script tests and wiring guards. Thirteen effective faults covered deletion, authorization wiring, incarnation fences, counting, reload and hook ordering, and audit behavior. Live peer delivery and final migration acceptance lanes remain unverified.
* perf(grpc): attribute rebuilds and bound bulk responses
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(grpc): attribute rebuild success after publication
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(obs): add exact HTTP/2 ping timeout diagnostics
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(multipart): run refusal matrix on large stack
Run the real-store completion refusal matrix through the shared 32 MiB test harness so its deep async storage future does not overflow libtest's default stack.
Keep the original test name and all refusal-order assertions intact.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* chore(deps): pin nixl-sys workspace source
Manage the nixl-sys Git revision from the workspace dependency table and point the optional Linux transport dependency at houseme/nixl commit cc636c83f13d692e85b67e55aed092413d16fb41.
Allow the reviewed source in cargo-deny and refresh the lockfile, replacing the unmaintained bincode dependency with the fork's wincode graph.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): authenticate msgpack peer capability
Add an optional boot-epoch-bound HMAC capability proof and cache the verified per-peer observation without enabling any msgpack send policy.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(grpc): bind peer capability to connection generations (#9433)
* feat(grpc): track physical connection generations
Observe every tonic physical reconnect through a stable custom connector while preserving existing TCP, TLS, HTTP/2, cache, and public channel behavior.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* feat(rpc): bind msgpack capability to connections
Scope authenticated msgpack observations to channel identity and physical connection generation so transparent reconnects require a fresh proof without enabling the send policy.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Stage inline overwrite rollback backups (xl.meta.bkp) directly relative
to the pinned destination directory descriptor in RenameCommitGuard
instead of staging in .rustfs.sys/tmp and walking both paths a second
time. Also fuse post-commit xl.meta.bkp removal and empty-ancestor
directory pruning into a single blocking dispatch while stopping at live
object roots.
gVisor presents a host bind mount as 9p, so statfs reports V9FS.
When the mountinfo options include both trans=fd and directfs, the
startup filesystem guard treats that endpoint as local POSIX storage
and logs that the host type is not visible. Real 9p and virtio shares
still warn.
Co-authored-by: hector <majinghe@users.noreply.github.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
* fix(iam): authorize delegated service account creation
* docs(iam): clarify explicit grants for custom administrator policies
* fix(iam): include service account delegation in admin wildcards
* style(policy): format delegated authorization test cases
* fix(iam): keep delegated authorization and replication consistent
* fix(ci): include delegated account test in E2E selections
* feat(diagnostics): restore allocator and runtime metrics
Port the missing live-byte accounting and serving-runtime observations from 13a30abca. Reuse the current MiMalloc GlobalAlloc wrapper, expose explicit metric availability, and cover allocation operations and feature selection.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): detach queued fdatasync followers safely
Adapt the follower timeout experiment from 138bc69f6 with exclusive queue ownership transfer. Move queued paths and resource units into independent sync, retain claimed batch ownership through completion, and record observed queue time. Cover publication before the original batch resumes, sync failures, claimed batches, and queue accounting.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* perf(ecstore): index sync followers and isolate missing sources
Use reusable slab slots and monotonic identities for constant-time queued follower extraction. Avoid retaining follower group references when the timeout is disabled. Preserve claimed-batch ownership and reject stale tickets after slot reuse.
Keep missing-source results local to their requests so healthy requests still synchronize their own files. Preserve fail-fast behavior for other disk I/O failures. Repair failure-probe synchronization and exercise source disappearance, reused slots, disabled tracking, cancellation and bounded admission on Linux.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ci): apply storage stack to multipart refusal fixture
Route the real-store absent-binding refusal-order fixture through the existing bounded 4 MiB storage setup in both default and CI profiles. The Linux CI failure reproduced with the default 2 MiB stack. Quota, legal-hold, error, cause, audit and notification assertions execute through the established storage fixture budget.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* fix(ecstore): make sync worker idle handoff atomic
Move batch claim, in-flight accounting and completion onto the existing worker guard. Publish the idle state under the queue lock so an enqueue during cleanup establishes successor-worker ownership. Keep stale cleanup conditional on current ownership.
Add a controlled interleaving regression that detaches the final queued follower and enqueues a successor after the empty claim. The old worker leaves that request without an owner; the refactored worker hands it off and completes one physical sync.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
* test(ecstore): await grouped sync resource release
Wait for native producer admission units to reach zero after the blocking sync finishes. This removes a scheduler-dependent assertion window exposed by the latest main integration while preserving the cancellation and ownership checks.
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
---------
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Share authorization between both CreateMultipartUpload edges. Keep the
decoded legacy fields intact, preserve the replication destination
version and apply the captured bucket incarnation before creating the
upload. Leave checksum, encryption and retention metadata on the same
storage path.
Verify the frozen legacy behavior on 2c2af51a before the migration and
exercise both stacks with 66 refusal cases and 22 success controls.
Read back sessions, version, retention and encryption metadata.
Fault probes made authorization tests fail on both edges when an action
or the resource binding was lost. Storage tests detected a different
destination version and unexpected sessions when generation, quota, KMS
or SSE checks were removed. The wire and
helper tests failed for early name rejection, lost timestamp precision,
metadata, checksum, SSE response, the operation count and unexpected
notification.
On 77da6339, 185 scoped tests passed with a 32 MiB test stack. The default
stack run passed 184 tests and reproduced the existing overflow in
completion_absent_binding_refusal_order_baseline. Both all-target
Clippy variants, test wiring, script tests and prepush passed. After
integration with 97a7639f, gateway all-target check and prepush passed.
Whole-workspace CI and rio-v2 were outside the local verification.
Share the streaming multipart write path and staged authorization across both edges. Resolve the native upload ID against the active storage record at the existing lookup. Carry checksums, trailers, SSE values and the stored ETag through each response projection.
Add seven tests for application lookup, route authorization, framing and durable part state. Exercise 62 refusals and 10 successful requests across those fixtures. The existing SSE-C completion test also covers the migrated UploadPart core.
Verification on 1467d32695: fixed legacy contract, 147 gateway-feature tests and 119 default tests, both all-target Clippy legs, script tests, test wiring and prepush checks. The test scopes include the entire access module. The gateway scope includes PutObject and both refusal matrices.
Twenty-two local fault controls exercised edge authorization, policy and generation, resource and upload ID projection, owner binding, lookup count and error ordering, logical length, trailer publication, checksum validation and typed producer errors. Each fault failed its intended test after the same artifact passed with the selector unset.
Linux RDMA and a native KMS denial through UploadPart remain unverified.
Validate lifecycle status across both request adapters and preserve mutation error priority, ordered rule IDs, and stored dates. Forward the original bucket and request envelope at the legacy edge. Pin the gateway lifecycle date carrier.
The priority fixture covers seven refusal cases and one success case. All 39 scoped tests passed after source restoration. Fifteen fault switches triggered 16 expected failures covering priority, early conversion, metrics and audit, action binding, transition writes, date precision, offsets, and rule indices.
The tests and both Clippy modes passed on 0567078 with gateway 2a6b8d1. The gateway all-target check and prepush passed after rebasing onto 1467d32. Full-workspace and remote CI results remain unverified.
Register PutObject and share write authorization with legacy PUT and
browser POST. Carry authenticated trailer declarations and captured
frames into the owned write, preserve typed eager-read errors, and keep
the table-catalog guard tied to the actual write call.
Verified on RustFS 0567078f5 with gateway d75b6ce on macOS. All 1022
affected tests passed with a 4 MiB test stack, along with both
all-target Clippy configurations, script tests, test wiring, and
prepush checks. A separate gateway wire run stored and read an empty
object using the rebuilt server binary.
Fourteen single-fault checks covered trailer selection and capture,
typed producer failures, tag policies, the shared write grants, and
POST policy projection. The reserved-prefix source guard also rejected
a fixture whose owned write call was replaced.
Route bucket versioning writes through the shared authorization and audited use case. Preserve legacy configuration preparation, the incarnation fence, refusal order, persisted XML, and the reload, replication, and scanner callbacks. Count each admitted write once at its edge.
Verified against RustFS 0567078f5 and gateway d75b6ceb. The signed wire cases cover six accepted writes and nine refusals per stack. The affected suite passed 29 tests, the typed-error suite passed 26, and both Clippy configurations, script tests, wiring, and prepush checks passed. The wire cases and both refusal matrices passed again after boxing the test fixture's SDK error.
Eight fault controls went red for both authorization hooks, the legacy counter, an omitted write, a dropped empty excluded prefix, Object Lock precedence, replication refusal, and the custom-status error. CI, the Linux reference comparison, and live multi-node callback delivery remain unverified.
Register GetObject and share its authorization and native response facts
with the legacy edge. Preserve conditional headers, range completion,
stream errors, body ownership, SSE reads and request accounting. Pin the
gateway 304 response-override fix without unrelated dependency changes.
Keep the incoming native Put path and update its profiling guard source.
Validation on b7e7a6156:
- Normal and mutation-disabled controls: 9/9 each.
- Affected suite: 754/755; the profiling guard still read the old Put file.
After correcting that source path, its targeted rerun passed 1/1.
- All-target Clippy passed with gateway-stack and default features.
- Formatting, script-tests, test wiring and prepush-quick passed.
- Authorization matrix: 40 refusals and 8 allowances across both edges.
Mutations: swapped version action, redirected resource, ignored denial,
and bypassed Served authorization failed the permission or HTTP checks.
Earlier effective mutations covered body copying, premature owner drop,
range status, missing 304 headers, a 304 body, wrapped stream error causes
and duplicate accounting. No assertions were removed or weakened.
Linux RDMA paths were not compiled or exercised. GetObjectAttributes,
PutObject gateway registration and the default-stack switch are not part
of this increment.
Use native gateway DTOs for stored notification reads, register the handler,
and keep both edges on the shared bucket authorizer. The legacy edge now
uses the compatibility seam. Notification writes and the default stack are
unchanged. Non-test changes: +53/-36 lines.
Add three refusal-oriented tests and two configuration-read tests, including
successful IAM controls. Cover absent and stored configurations, reserved
bucket shapes, unknown stored XML, event/filter values, bucket-bound IAM
allow/implicit deny/explicit deny, and one handled-operation count.
Mutation controls on da5414c: bypassing each edge's authorization made its
notification_authorization_binds_the_bucket_on_the_*_stack test fail because
the wrong bucket was served. Dropping the stored queue made both
*_stack_answers_the_stored_notification_configuration tests fail. Restore
hashes were checked and sources were touched before a real rebuild.
Validation: 279 scoped tests passed on da5414c; 70 scoped tests passed after
rebasing to fd8dc41. Both rustfs all-target Clippy builds passed on fd8dc41,
as did fmt, test wiring and prepush-quick. Script tests passed on da5414c.
The earlier broad run reported one existing CORS test as leaky with exit 0.
CI and the full workspace suite were not run.
Use RequestEnvelope, a native upload body, raw write fields and owned results in the PutObject core. Legacy and RDMA ingress project once; internal writes share the core. Preserve archive batching, shared SSE and object-lock validation, completion ownership, audit events and response facts. Keep the merged RDMA length, cache lifetime and response-header behavior.
No gateway registration or UploadPart migration is included. Source outside test files/modules: +820/-383 (including conditional test imports).
Validation on fd8dc41f0c: fmt; default and gateway-stack all-target Clippy; 903 scoped tests with RUST_MIN_STACK=4194304; script-tests; test wiring; prepush quick checks. The archive authorization matrix has six refusal cases and three allowed cases, with persisted object/metadata checks. A fixed a279 legacy TCP baseline has 48 matching response records; the two retained socket tests cover PUT and POST behavior. The recorder observes drained counter deltas alongside the official cumulative 0/1/2/3 operation totals.
Mutation evidence: 44 distinct faults, grouped below by the test that rejected them. The counter and archive authorization additions each passed an unflagged control before their five mutations. The other fault controls and failures were retained from the same unchanged implementation.
- app::object::native_body::tests::legacy_body_preserves_demand_pending_and_length_validation_location: body-eager, body-length
- app::object::native_body::tests::legacy_producer_error_keeps_its_concrete_type_and_is_not_eof: producer-source
- app::object::native_body::tests::internal_producer_error_preserves_io_kind_and_nested_source_after_data: producer-source
- app::object::native_body::tests::native_trailers_are_published_only_at_eof: trailer-pending, trailer-value
- app::object::native_body::tests::native_framing_and_classified_errors_are_not_unwrapped: native-byte-count, native-class, native-kind
- storage::ecfs::legacy_edge::object_write::native_put_tests::legacy_projection_defers_invalid_raw_values_to_the_existing_validators: input-bucket, input-key, input-storage_class, input-server_side_encryption, input-object_lock_mode, input-object_lock_legal_hold_status
- storage::ecfs::legacy_edge::object_write::native_put_tests::legacy_projection_keeps_each_checksum_and_unknown_length: input-checksum_crc32, input-checksum_crc32c, input-checksum_sha1, input-checksum_sha256, input-checksum_crc64nvme, input-length, input-trailer
- storage::ecfs::legacy_edge::object_write::native_put_tests::owned_response_projection_preserves_status_headers_and_all_checksums: output-e_tag, output-checksum_crc32, output-checksum_crc32c, output-checksum_sha1, output-checksum_sha256, output-checksum_crc64nvme, output-status, output-headers
- app::object::put::tests::put_read_quorum_failures_are_normalized_at_each_stage: error-status, error-message, error-source
- app::object::put::tests::put_commit_lock_failure_keeps_request_operation_in_spawned_owner: error-headers
- app::object::put::tests::cancelled_put_request_completes_post_commit_publication: completion
- app::object::shared::tests::build_put_like_object_lock_metadata_rejects_mode_without_retain_until_date: lock-pairing
- app::object::shared::tests::build_put_like_object_lock_metadata_rejects_retain_until_date_without_mode: lock-pairing
- storage::ecfs_test::tests::test_parse_object_lock_retention: lock-presence
- app::object::extract::tests::snowball_member_mtime_requires_member_replication_authorization: archive-replication
- table_catalog::tests::put_object_reserved_prefix_guard_rejects_broken_native_delegation: guard-reason
- object_write::legacy_owned_put_preserves_refusal_order_checksums_and_short_body: refusal-priority, output-headers, output-checksum_crc32
- app::object::put::tests::put_edge_counts_polled_requests_once_before_usecase_refusal: count-missing, count-double
- app::object::extract::tests::snowball_owned_member_privileges_gate_storage: archive-tagging, archive-retention, archive-legal_hold
Existing expected values are unchanged.
Not verified: CI, Linux RDMA execution, performance, and gateway native-frame trailer consumption through this business core. The native trailer adapter itself is covered; gateway integration is a separate increment. The local suite uses a 4 MiB stack and makes no claim about default-stack behavior.
* feat: S3-over-RDMA with NIXL and cuObject transports
A signed S3 request with an empty body names a registered client buffer; the server moves the object bytes with one-sided RDMA (NIXL/UCX, or NVIDIA cuObject through the cuobject crate) instead of the HTTP body. Internode shard reads and writes can also move over NIXL.
Applied onto main from #9305 (head 0f3c19a0f); the stacked #9302-#9304
commits are already on main as eca95f297. Conflicts were resolved where
this change met newer main: crates/ecstore/src/api/mod.rs (kept the
internode-transport exports, added the nixl module),
crates/rio/src/http_reader.rs (internode_http_request uses the pooled
get_http_client::<false>), rustfs/src/storage/rpc/http_service.rs
(write_authenticated_put_file stays a plain fn returning a future, now
pub(super)), rustfs/src/app/multipart_usecase.rs (the RDMA UploadPart
branch moved into multipart_usecase/upload_part.rs after the
per-operation split), Cargo.lock (main's lock plus only this change's
new packages).
* fix(rdma): build the RDMA crates without vendor SDKs and pass guards
Maintainer changes on top of the contributed S3-over-RDMA work:
- rustfs-cuobject: cuobject is an optional, default-features = false
dependency behind a new `server` feature (enabled by the rustfs
`cuobject` feature); the crate root is #![cfg(feature = "server")], so
without the feature it exports nothing and a workspace build needs no
NVIDIA cuObject SDK.
- The NIXL agent handle (OnceLock, install_nixl_server, nixl_server)
moved from app/object/cuobject.rs to storage/rpc/nixl_read.rs; the app
init installs it. The layer-dependency guard rejects infra -> app.
- New code reaches ECStore through a cfg-gated `ecstore_rdma` facade
module and s3s types through the existing re-export hubs
(architecture-migration and s3s-footprint guards).
- SAFETY notes at the two #[allow(unsafe_code)] sites, inside the window
the unsafe-allowance guard checks.
- transport_config_known_backends_are_current_oss_values loops over
KNOWN_INTERNODE_DATA_TRANSPORT_BACKENDS again, expecting nixl to name
itself.
- New non-required workflow rdma-feature-check.yml runs
`cargo check --locked -p rustfs --features nixl` on Linux (paths
filter, weekly, manual), registered in scheduled-validations.json.
* fix(ecstore): keep NIXL internode error messages constant
The three io::Error::other(format!(..)) sites in nixl_internode.rs
(read refused, write refused, write byte-count mismatch) now return
constant messages; the status, response body length and byte counts go
to a debug! line in the same place, the level this file already uses for
a failed NIXL peer call. No response body is logged, as on the HTTP
internode path.
The error-format ratchet exists because per-disk formatted messages make
otherwise identical errors compare unequal and split the quorum
reduction; constant messages keep them in one bucket. A typed transport
error would carry the detail without that problem; this takes the
mechanical route.
* fix(ecstore): flush staged NIXL writes before waiting for buffers
* fix(rdma): build rustfs-nixl only on Linux
nixl-sys's stub build links -lstdc++, which macOS does not ship, so
`cargo test -p rustfs-nixl` (and a workspace test run) failed to link on
macOS. rustfs-nixl's dependencies are now Linux target dependencies and
its crate root is #![cfg(target_os = "linux")]; the rustfs `nixl`
feature code that was not already Linux-gated (the storage/rpc nixl_read
module, open_shard_contained, the internode route arms and the facade
module) is now cfg(all(feature = "nixl", target_os = "linux")). Linux
builds are unchanged: the workspace tests still build and run the
crate's tests through the stub.
* ci(rdma): alert on scheduled failures of the RDMA feature check
The test-wiring guard requires every scheduled validation workflow to carry the shared alert-on-failure job; a failed weekly run now opens or updates the tracking issue like the other scheduled lanes.
* fix(rdma): put rustfs-nixl behind a sys feature
nixl-sys needs a C++ compiler and libclang (bindgen) to build, which the shared Linux runners do not have, so Workspace Clippy and Lint and Build failed once the crate compiled there. Its dependencies are now optional behind a 'sys' feature that the rustfs 'nixl' feature enables; without it (and off Linux) the crate is empty, so no default or workspace build touches vendor C/C++ tooling. The RDMA feature check now also runs the crate's unit tests with the feature on; they use a fake sysfs and host memory, no device.
---------
Signed-off-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: Rain Jiang <rain-jiang@outlook.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
2026-11-15 00:10:10 +08:00
1089 changed files with 180317 additions and 47465 deletions
"basis":"Exactly the two previous-release sources pinned in .github/workflows/e2e-upgrade.yml are exercised today (source.version / source.asset / source.sha256). No other N-1/N-2 compatibility is claimed, and these digests are not inferred from tags.",
"basis":"The three previous-release sources pinned in .github/workflows/e2e-upgrade.yml are exercised today (source.version / source.asset / source.sha256). No other N-1/N-2 compatibility is claimed, and these digests are not inferred from tags.",
"rollback_basis":"Only the bucket-config-rollback case (rollback_to_previous_release_reads_current_bucket_metadata) is exercised. Full data-plane rollback is not certified and is never a default claim."
"rollback_basis":"The release upgrade lane checks bucket-configrollback. The hosted compatibility workflow also checks in-flight multipart rollback to 1.0.5. Full data-plane rollback is not certified and is never a default claim."
**Use this when** validating inline placement, block geometry, Range reads and reader rollback in a task-owned local Docker cluster.
The adapter reuses the repository's four-node compose topology with 16 logical Docker volumes and EC12+4. It binds one S3 port to loopback, keeps strict durability and checks running binary hashes and persisted object geometry. Docker volumes share the host storage substrate. Performance observations describe this local virtualized lab.
## Build a frozen server image
Use the current stable toolchain pinned in the lab Dockerfile. Supply a Git bundle and the metadata inspector source as the build context. The server is compiled from a clean checkout before the diagnostic example is added.
```bash
set -euo pipefail
LAB_BUILD_DIR="$(mktemp -d)"
LAB_REVISION="$(git rev-parse HEAD)"
git bundle create "$LAB_BUILD_DIR/repository.bundle" HEAD
Select a new compose project and a private state directory. The adapter generates test credentials there. Existing resources require matching ownership labels. Configure checks the image's source revision and pins immutable image IDs. Each operation takes an exclusive state lock. Deployment waits for `/health/ready` on every node, covering storage, IAM, lock quorum and peer dependencies.
The probe verifies complete bytes, HEAD sizes, Range contents, EC12+4 and the actual persisted block. It records inline markers for 4 KiB, 1 MiB, 1 MiB + 1 byte, 1.25 MiB, 1,572,856 bytes, 1,572,857 bytes and 1.5 MiB objects in `probe.json`. The server-only image includes the existing filemeta decoder through a small geometry inspector. Console assets and the administration CLI are outside this lab image.
## ABBA deployment hook
Use `inline_docker_lab.py ... deploy` in the existing `run_hotpath_warp_abba.sh` external deploy hook. Export `RUSTFS_ERASURE_SHARD_BYTES` according to `HOTPATH_ABBA_PHASE`. The adapter uses the supplied leg, phase, bucket, binary and evidence-file context, resets only owned lab volumes, checks running configuration and binary hashes, creates the fresh bucket and writes the runner's deployment evidence.
Use the same frozen binary for both sides of a geometry experiment. Fix the inline budget and encoding mode, then compare zero with one candidate shard value. Include the CPU, memory and image identities from every node in each result. The state `config.json` supplies the generated test credentials for the load driver. Set `DOCKER_CONTEXT` to the selected context when the driver captures Docker resource snapshots.
For content compatibility across an image or geometry change, configure the next selected image and artifact using the same state, then deploy with `--keep-data` and an existing bucket. This retains owned volumes. Compare existing objects and version IDs with the manifest prepared before the change.
## Cleanup
```bash
scripts/python_bin.sh scripts/inline_docker_lab.py --state-dir "$LAB_STATE" down --purge
```
Cleanup checks ownership for containers, volumes and networks. A configuration cannot adopt another project's resources. Raw measurements, state, Git bundles and build outputs stay in task artifact directories.
Unit checks run with `scripts/python_bin.sh scripts/test_inline_docker_lab.py` and are included in `make script-tests`.
## Linux content-probe client
The PUT after-probe requires a working `mc`. For a macOS client affected by cgo initialization failures, compile the same frozen public mc module for Linux with CGO disabled, build it with `Dockerfile.mc`, and use `scripts/inline_docker_mc.sh` as the process-local `mc` command. Record the module version, checksum and resulting image ID with the run.
The adapter rewrites only the lab loopback alias endpoint to the private `node1` endpoint. Alias configuration stays in the probe's own `MC_CONFIG_DIR`, and `cat` streams raw bytes. The existing HEAD, GET and hash checks continue to execute.
`deploy --rpc-mode json-compat` explicitly clears both MessagePack-only flags on every node. `deploy --rpc-mode msgpack-only` enables both flags for the selected homogeneous lab fleet. Deployment evidence records the mode and checks both running flags. The default is `json-compat`. The ABBA hook may select the same mode through `RUSTFS_INLINE_LAB_RPC_MODE`.
First compare the base and bounded-multi-block binaries at `--shard-bytes 0` in JSON compatibility mode. Then repeat with MessagePack-only on both sides. A same-binary transport ABBA isolates the encoding effect. Keep the 128 KiB budget, CPU sets, strict durability, load and object set fixed. Check actual markers and block sizes at the boundary sizes before timing. Retain baseline-drift and candidate gates, error logs and raw request distributions.
For a rolling downgrade, redeploy the current binary with `--keep-data --rpc-mode json-compat` before introducing an older node. Check old and new reads, version IDs and batch deletes against the persisted manifest. A running MessagePack-only flag pair establishes the lab configuration. Compatibility with a particular old reader requires the explicit reader test.
## Preserve a compatibility manifest
Run the seed once in a fresh lab bucket. It records full byte oracles and the observed version inventory, including any additional version matching a known body, and leaves a 5 MiB multipart part ready for the next reader. Each bucket has its own private `compat-<bucket>.json` manifest. Keep the same state and volumes across image changes. A fresh deployment or cleanup that resets volumes moves existing compatibility manifests into `compat-history`. Retained-data deployments preserve the active manifests.
The check compares every persisted version ID, HEAD length, complete SHA256, cross-block Range and per-version geometry from `xl.meta`. The seed includes zero-length objects, null versions, the 192 KiB versioned admission boundary and the accumulated 128 KiB shard boundary. Seed a second bucket on the new writer before the downgrade, then check both manifests using the selected old reader. Complete an old upload on the new binary and a new upload on the old binary. After returning to the current fleet, `compat-delete --bucket <bucket>` deletes the recorded versions in one S3 batch and checks the exact remaining inventory and bytes.
Successful multipart-completion and batch-delete receipts are saved before subsequent content and geometry checks. If either check fails, rerun the same command with the same state directory to resume verification from the saved completion state. After a seed check fails with a saved manifest, use `compat-check` to resume verification.
For mixed-version testing, retain JSON compatibility mode throughout the rolling replacement. Verify each node's immutable image and binary, then perform manifest checks and new writes through both coordinator versions using `--coordinator node1` and `--coordinator node4`. The manifest records the actual writer coordinator revision from the running image. Stop one owned node to check read availability at EC12+4, restore it and check the manifests again. Record the exact oldest tested source revision, toolchain and build profile with the evidence. The version boundary is established by these executed cells.
An owned lab can replace just its fourth node through a compose image override. Select the frozen old image first and verify its revision label. Keep `compose.json` in JSON compatibility mode for this cell.
Inspect all four running image IDs and binary hashes before recording the mixed-fleet result. Redeploy the configured current image with `--keep-data --rpc-mode json-compat` to restore a homogeneous fleet. The same manifest checks apply after stopping and restarting one owned node through the base compose file.
@@ -34,6 +34,10 @@ If you want the Kafka-backed HA Tempo path, use `docker-compose-example-for-rust
- **High Performance**: Optimized configurations for batching, compression, and memory management.
- **Standardized Protocols**: Built entirely on OpenTelemetry standards.
## HTTP Request Latency Percentiles
The main RustFS dashboard shows request latency percentiles in milliseconds. The HTTP server request, response-body chunk, and response-body stream histograms export bucket boundaries in seconds. During a rolling upgrade or rollback that changes the bucket layout, compute percentiles from nodes that share one layout and from a query window entirely on that layout. The bundled dashboard and recording rules use a five-minute window. The mean from `_sum` divided by `_count` remains usable across the change.
## GET Performance Optimization Dashboards
Three pre-built Grafana dashboards are included for monitoring RustFS GET performance optimization rollout:
@@ -22,6 +22,8 @@ Identify the tested commit and any local changes. When testing a prebuilt binary
List relevant checks not run and the remaining risk. Use the validation tier in AGENTS.md; do not run broader checks solely to fill this section. For documentation-only changes, list the applicable documentation checks. Use N/A only when verification is not applicable.
-->
**auto-testing regression coverage** <!-- For each issue-backed bug fix, give the added or extended case ID or PR link, the existing case ID/path and assertion that catches the bug, or "Skipped" with a brief reason. Omit this line for other changes, including documentation-only fixes. -->
## Impact
<!--
Describe user-facing, compatibility, API, deployment, configuration, or documentation impact. Use N/A when there is no expected impact.
@@ -80,6 +80,18 @@ Do not commit one-shot plans, trackers, migration ledgers, benchmark snapshots,
Select checks from the final task-owned diff. Scoped `AGENTS.md` files may add a concrete path-specific check, but must not replace this tiering with a generic full-workspace gate.
### Issue Fixes and External Regression Coverage
After fixing a bug tracked by an issue and running the applicable local checks, ask the developer once per fixed issue whether to cover it in [rustfs/auto-testing](https://github.com/rustfs/auto-testing). Ask before opening or updating the fix PR, or before reporting completion if there is no PR. Reuse a choice already made for that fix. Investigation alone and documentation-only changes do not trigger this prompt.
When presenting the three choices, describe the failing scenario and the assertion that would catch it.
- **Add or extend a case.** Prefer extending an existing scenario when it can exercise the regression. Record the resulting case ID or auto-testing PR link.
- **Already covered.** Cite the existing auto-testing case ID or path and the assertion that would catch this bug.
- **Skip.** Record the developer's one-line reason and continue with the fix.
Record the choice in the PR's Verification section or in the completion report for work without a PR. All three choices retain the applicable RustFS verification requirements below.
### Documentation and Instructions
For prose, comments, agent instructions, and skill metadata that cannot affect runtime/build output:
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deployment
- **The S3 protocol stack is now rustfs/gateway**, and it is the only S3 stack. The legacy s3s-based stack is removed, and so are the `RUSTFS_S3_STACK` environment variable and the `gateway-stack` cargo feature. There is no on-disk format change. `RUSTFS_S3_STACK` no longer selects anything: a server started with it set, to any value, refuses to start and prints `RUSTFS_S3_STACK is no longer supported; the gateway stack is the only S3 stack since <version>`, where `<version>` is the release's version. Remove the variable from service units, container environments, Helm values and orchestration files before upgrading. To roll back, follow the [S3 stack rollback procedure](docs/operations/s3-stack-rollback.md).
- Before upgrading, verify that the configured root access key is at least 3 bytes and the root secret key is at least 8 bytes. RustFS now rejects shorter values at startup and identifies the setting to update. Version 1.0.5 accepted these settings at startup and returned HTTP 500 when root requested STS credentials. Coordinate root credential changes across all nodes and clients. See [root credential rotation considerations](docs/operations/two-factor-auth.md#root-credentials-cannot-be-changed-at-runtime).
- Existing volumes created by older root-running container images must be writable by the non-root runtime identity before upgrading. The default container UID/GID is `10001:10001`; stop the affected instances, verify host mount paths, and for ordinary bind mounts run `sudo chown -R 10001:10001 /actual/data /actual/logs` on each RustFS data/log mount. Account for ACLs, NFS, Kubernetes, and rootless UID mappings. Image-build ownership changes do not migrate mounted data. See the Docker Quick Start in [README.md](README.md).
@@ -44,6 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- **SSE-C multipart and copy responses no longer carry `x-amz-server-side-encryption`**: `CreateMultipartUpload`, `UploadPart`, `UploadPartCopy` and `CompleteMultipartUpload` on an SSE-C upload, and `CopyObject` to an SSE-C destination, answered with `x-amz-server-side-encryption: AES256` next to the customer-key headers, so a client reading the response saw an SSE-S3 object. They now return only `x-amz-server-side-encryption-customer-algorithm` and `x-amz-server-side-encryption-customer-key-MD5`, as `PutObject`, `GetObject` and `HeadObject` already did. SSE-S3 and SSE-KMS responses are unchanged.
- **Vault KMS backends no longer fail when the server answers reads from a replica**: a Vault or OpenBao node that serves reads locally (an OpenBao standby, a Vault Enterprise performance standby) can return the state from before a write for a short while after acknowledging it. Against such a node the KV2 backend failed every key creation with `404 Key not found` while leaving the key stored without its description and tags, failed operations issued right after a create or update with `Key not found` or `Concurrent modification`, and the Transit backend failed a disable followed quickly by an enable. Key creation on the KV2 backend is now a single create-only write that carries the description and tags. Both backends now re-read a key record when the answer is older than a write the same RustFS node made in the previous five seconds, pause before re-reading after a lost check-and-set write and allow five attempts instead of three, and retry a Transit key delete that is refused because the deletion switch is not visible yet. A different RustFS node reading the same replica can still observe the earlier state until the replica catches up; see [OpenBao as the Vault KMS backend](docs/operations/kms-openbao-compatibility.md).
- **KMS keys could not be described by ARN through the path route**: `GET /rustfs/admin/v3/kms/keys/{key_id}` read the path segment verbatim, so a key id that has to be percent-encoded to fit in one segment — an AWS key ARN, with its `:` and `/` — was looked up, authorized and audited under its encoded spelling and answered `404`. The segment is now percent-decoded first; a segment that is not valid UTF-8 after decoding is refused with `400 InvalidArgument`. The `describe-key?keyId=` form was unaffected.
@@ -114,6 +118,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Four-layer regression-prevention tests guard against silent feature deletion: compile-time module assertion, module-presence unit test, cross-module `Protocol` enum assertion, end-to-end SSH banner test against the running binary
### Changed
- **Startup reports the state of `RUSTFS_SSE_S3_MASTER_KEY`**: the server now checks the local SSE-S3 master key when it starts and logs one `sse_local_master_key` event with `state``loaded`, `not_set`, or `invalid`. An unusable value used to surface only as a `400 InvalidRequest` on the first SSE-S3 request served without a KMS; it is now logged as an error at startup with the reason. Startup still succeeds and request behavior is unchanged. The line "Using RUSTFS_SSE_S3_MASTER_KEY for SSE-S3 (KMS not configured)", logged when the key was first used, is replaced by this event.
- **Scanner bucket walkers are no longer tied to the disk count**: a new scanner key `walkers_per_disk` (`RUSTFS_SCANNER_WALKERS_PER_DISK`, `1` through `16`, default `1`) spawns that many bucket walkers per local disk of an erasure set, so a single-disk deployment can walk several buckets at once instead of one bucket, one object at a time. The walkers of one disk share its scanner admission, so a peer still sees one scan session per physical disk, and remote disks keep one walker. The walker count is what `max_concurrent_disk_scans` caps and the disk count stays the floor; the `disk_concurrency_budget` log line now reports `walkers_per_disk`, `walkers`, and the `reason` for the effective limit. The default keeps today's I/O profile because a local disk cannot yet report whether it is rotational; the design intends a higher default on flash once it can (`docs/architecture/scanner-per-bucket-convergence.md`). As groundwork for pacing, the raw-enumeration page writer inserts into its building page in place and commits pages without copying them, and a regression test pins the cost of recording 20,000 entries in one prefix so the quadratic bookkeeping removed by [#8114](https://github.com/rustfs/rustfs/pull/8114) (rustfs#8113) cannot return. No persisted format, protocol or admin API changes beyond the additional config key, which older releases preserve and ignore.
- **Encryption and KMS work merged since `1.0.0-rc.5`** (entries were missing from this section):
- **Persisted KMS configuration secrets** are sealed field-by-field with `RUSTFS_KMS_CONFIG_SECRET`. **When the variable is unset the secrets are persisted in cleartext and the server only warns** (`persisted KMS configuration carries cleartext secrets`); it never refuses the write. Set it, identically, on every node, and re-save the configuration to seal an existing one.
-`RUSTFS_SCANNER_READ_ONLY_HANDOFF=true` enables reuse of unpublished scanner progress across verified read-only process restarts. Unset, false or invalid values disable both identity restoration and receipt creation. Existing receipts are still durably consumed before recovery starts, even when the feature is disabled.
- Deploy receipt-aware readers to every possible writer before enabling this flag. Before rolling back to an older binary, disable it on every node, start each node with all its drives present, wait for readiness, and shut down cleanly. Do not start the older binary until every node completes this preparation. Direct rollback after enabling receipt writes is unsupported: older startup/recovery paths can write without durably invalidating the receipt. See [the receipt and rollback contract](../../docs/architecture/scanner-usage-publication.md#read-only-restart-continuity).
Scanner cycle budget controls:
@@ -302,6 +308,8 @@ Drive timeout profile preset:
RustFS production guidance remains direct-attached local POSIX filesystems. Network-mounted filesystems (for example `nfs`, `cifs`, `smb2`, and `fuse.*`) are treated as unsupported by this startup guard. On Windows, endpoints on network drives (UNC shares such as `\\server\share` and mapped drive letters) are treated the same way, even though Windows reports the server's filesystem (usually `NTFS`) for them.
A local POSIX filesystem bind-mounted into a gVisor sandbox with directfs is a supported storage path. gVisor presents that bind mount as `9p`/`V9FS`, so the host filesystem type is not visible; the startup guard recognizes mountinfo options `trans=fd` and `directfs` and does not treat the mount as unsupported. Genuine 9p, virtio, and NFS shares remain unsupported.
## 📄 License
This project is licensed under the Apache License 2.0 - see the [LICENSE](../../LICENSE) file for details.
/// - Note: Enabling auto-heal can improve system resilience by automatically addressing issues, but may increase resource usage; evaluate based on your operational requirements.
| **upgrade compatibility** | `upgrade_compatibility_test` | Pinned previous-release writes followed by current-build reads on the same data directory |
| **dual-stack differential** | `dual_stack_differential` | Two single-node servers answer one SDK script for all 73 S3 operations and every differing `(op, field, a, b)` is reported. Side A is the binary under test on `RUSTFS_S3_STACK=legacy`; side B runs `RUSTFS_E2E_STACK_B`. Set`RUSTFS_E2E_REFERENCE_BINARY`to a released `rustfs` binary to make side A that binary instead (started without `RUSTFS_S3_STACK`, which older releases do not know). A missing, non-file or non-executable path fails the run; it never skips or falls back to the same-binary mode. The report in `<target>/dual-stack/<run>.json` records `reference_side` and each side's `--version` output |
| **dual-stack differential** | `dual_stack_differential` | Two single-node servers answer one SDK script for all 73 S3 operations and every differing `(op, field, a, b)` is reported. Both sides run the binary under test on its only (gateway) stack unless`RUSTFS_E2E_REFERENCE_BINARY`names a released `rustfs` binary, which then runs side A. A missing, non-file or non-executable path fails the run; it never skips or falls back to the same-binary mode.`RUSTFS_E2E_STACK_B_REGION` starts side B in another region to inject a difference. The report in `<target>/dual-stack/<run>.json` records `reference_side` and each side's `--version` output |
The external-tool `storage_metric_ownership_test` validates the OTLP/Collector/Prometheus path, including a rolling upgrade and node failures. See the [storage metrics guide](../../docs/operations/storage-metrics.md) for its required binaries and focused command.
@@ -211,6 +211,8 @@ the wiring source of truth. Committed test-ID digests under
**Endpoint blackhole scenario skipped** — `heal_erasure_disk_rebuild_test::tests::test_cluster_root_heal_recovers_after_target_endpoint_blackhole` installs a loopback `iptables` DROP rule and therefore needs `CAP_NET_ADMIN` (root or passwordless `sudo -n iptables`). A host where `iptables` is missing or cannot read the OUTPUT chain (typical inside an unprivileged container, where the nf_tables backend reports "Permission denied" even under `sudo`) logs a `heal_interruption_skipped` warning and returns without exercising heal. Set `RUSTFS_E2E_REQUIRE_NET_FAULT_INJECTION=1` on lanes that do provision the capability so a broken runner fails instead of skipping.
The full suite compares persisted bucket configurations and object records against the release pinned in `.config/reference-binary.toml`. Set `RUSTFS_PERSISTENCE_REFERENCE_BINARY` to the verified executable and `RUSTFS_PERSISTENCE_CLOCK_LIBRARY` to the absolute path of libfaketime (`libfaketime.so.1` on Linux or `libfaketime.1.dylib` on macOS). To retain the two sets of 13 XML documents for the gateway golden corpus, set `RUSTFS_PERSISTENCE_XML_DIR` to an output directory. CI includes them in the full suite's JUnit artifact.
**Reproduce a CI failure locally** — run the exact profile/lane:
"MPU mixed degraded: one offline disk, three missing part directories; previous returned empty, current returned 503 SlowDownRead; original part restored on both"
"MPU mixed degraded: one offline disk, three missing part directories; checked each coordinator against its release contract; original part restored on both"
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.