* 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>
* 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>