Commit Graph

4472 Commits

Author SHA1 Message Date
Hauser Zhi ebafdec9be perf(obs): prepare fixed descriptors once per bucket collection
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 21:11:59 +08:00
Hauser Zhi ec3ba6d239 Merge remote-tracking branch origin/main into usage metrics fix
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 20:58:02 +08:00
Hauser Zhi 9b74b97337 perf(obs): publish storage snapshots without per-point copies
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 20:58:02 +08:00
RustFS ad9b5e29e6 fix(s3,ecstore): mitigate high-concurrency 503 cascades and 500 leaks (#9857)
* fix(s3,ecstore): mitigate high-concurrency 503 cascades and 500 leaks

Eliminate HTTP 500 InternalError leakage under internode RPC saturation, isolate high-concurrency S3 HTTP/503 root causes with machine-parseable telemetry, and mitigate quorum/lock/breaker cascades across distributed 4x4 clusters:

1. S3 503 root-cause attribution & Prometheus telemetry:
   - Propagate `x-rustfs-503-subcause` (via `classify_s3_503_subcause` and `scope_503_subcause` alongside `x-rustfs-error-cause`) across S3 and readiness responses when returning HTTP 503 (`ServiceUnavailable`, `SlowDown`, `SlowDownRead`, `Busy`).
   - Export `rustfs_s3_503_responses_total{code, subcause}` on `/rustfs/v2/metrics` via `rustfs-io-metrics` without per-object cardinality explosion.

2. Eliminate HTTP 500 leaks under transient internode transport pressure:
   - Map `StorageError::BackendUnavailable` and `StorageError::BackendTimeout` to S3 503 `SlowDown` instead of falling through to 500 `InternalError`.
   - Stop evicting shared `tonic::Channel` connections on RPC deadlines or non-broken-transport errors when a peer remains active (`is_host_considered_healthy`), preventing mid-flight `Status::cancelled` collateral damage across concurrent shards and lock batches; map transient `Status::cancelled` on `RemoteDisk` to `DiskError::FaultyRemoteDisk`.
   - Classify `InternodeHttpErrorKind::Unknown` with `operation().is_some()` in `is_unavailable_internode_http_error` and check `UnexpectedEof` / `hyper::Error::is_closed()` / `is_canceled()` after the body-phase guard in `rustfs-rio` `HttpReader` so pre-body pooled keep-alive resets retry cleanly without hiding mid-body stream aborts.

3. Mitigate distributed write-quorum, lock, and circuit-breaker cascades:
   - Enable internode bulk/control gRPC channel isolation by default (`DEFAULT_INTERNODE_CHANNEL_ISOLATION = true`), raise control concurrency (`64 -> 256`), bulk pool size (`2 -> 4`), HTTP/2 stream window (`1 MiB -> 4 MiB`), connection window (`2 MiB -> 16 MiB`), and internode HTTP pool idle capacity (`16 -> 128`, `90s` timeout).
   - Cap distributed lock backoff ceiling (`80ms -> 25ms` base ceiling) and scope anchor-voter pre-acquisition serialization strictly to exclusive writer retries (`attempt > 1`) so first-attempt single-object PUTs run full parallel quorum fanout while contended hot-key writers still prevent livelock.
   - Tune circuit-breaker failure threshold (`5 -> 20`), sliding window (`10s -> 5s`), open cooldown (`5s -> 1s`), and half-open probe concurrency (`3 -> 8`) to stop self-amplifying 5s cluster-wide 503 blackouts after sub-second bursts.

Fixes https://github.com/rustfs/backlog/issues/3402

Signed-off-by: RustFS <hello@rustfs.com>

* fix(ecstore,lock,s3): address PR review findings and add tests

- Split drive-scoped mark_faulty (self.health.completed_ops()) from host-scoped tonic::Channel eviction (host_completed_ops(&self.addr)) in RemoteDisk so sibling progress on the same peer does not keep a stalled drive Online, with regression test sibling_drive_progress_preserves_host_channel_without_suppressing_stalled_drive_fault.
- Restrict anchor_serialized early return in DistributedLock::acquire_lock_quorum_once_inner strictly to definitive lock contention (is_definitive_lock_contention) so anchor timeouts or open request-breakers fall through to remaining voters, with regression test exclusive_retry_fans_out_to_remaining_voters_when_anchor_times_out_or_breaker_opens.
- Pass LockRequestAdmission into RemoteClient::record_request_timeout and require the active probe_generation before escalating an existing backoff window, with regression test late_pre_backoff_timeout_after_expiry_does_not_escalate_without_failed_probe.
- Record rustfs_s3_503_responses_total(ServiceUnavailable, readiness_pending) in service_not_ready_response without double-counting and assert both header and counter in service_not_ready_response_preserves_observable_contract.
- Wire matching ObjectWriteStalled / ObjectReadStalled traffic-stall overlays into ClusterWrite and ClusterRead health reports while keeping StartupFinalizationPending scoped to node readiness.

Signed-off-by: RustFS <hello@rustfs.com>

---------

Signed-off-by: RustFS <hello@rustfs.com>
2026-12-02 20:53:48 +08:00
Hauser Zhi 1f9556564f perf(obs): batch bucket quota metadata reads
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 20:33:13 +08:00
Hauser Zhi ab7f7139a9 perf(obs): hand off fresh usage without waiting for capacity
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 20:14:53 +08:00
Hauser Zhi fa5c206fe4 perf(obs): share one usage observation per cluster tick
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 19:57:55 +08:00
Hauser Zhi bfa29bdfe2 Merge remote-tracking branch 'origin/main' into houseme/fix-9847-usage-metrics
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 19:55:16 +08:00
Chris An d8e2353825 fix(ci): prevent fuzz build OOM and stabilize workspace/http3 tests (#9856)
* fix(ci): prevent fuzz build OOM and stabilize workspace/http3 tests

* fix(fuzz): split fuzz build codegen units and bound dep opt-level/lld threads
2026-12-02 19:48:58 +08:00
Hauser Zhi 0aa0391d8f fix(obs): verify live topology for projected usage totals
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 18:40:04 +08:00
Hauser Zhi 6420cf2da5 fix(obs): export usage from validated scanner observations
Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 18:34:46 +08:00
Rasmus Haslund 615e55825e fix(s3): echo multipart checksums in ListParts (#9814)
Carry the upload's checksum algorithm and type and each part's recorded checksums through PartInfo and render them in the ListParts response.
2026-12-02 16:08:17 +08:00
Hauser Zhi 2537596a4f chore(deps): refresh Cargo dependencies (#9842)
* chore(deps): refresh Cargo dependencies

Update TAR and Windows bindings, preserve Windows file disposition flags, and retain the recorder version shared with Kafka and Gateway RDMA. Refresh the standalone fuzz dependency graph.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* chore(deps): upgrade metrics to 0.25

Route metrics 0.24 consumers through the 0.25 implementation in both workspaces. Verify that legacy metrics share the recorder and that dependency resolution cannot silently restore a second recorder.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* chore(deps): update RustFS Kafka to 1.5.0

Resolve both Kafka packages at 1.5.0 and drop the unused metrics facade patch from the fuzz workspace. Keep the main workspace facade for the remaining Metrique dependency.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* fix(metrics): disambiguate the doctest extern names

Alias the 0.25 implementation so rustdoc can link it alongside the 0.24 compatibility facade. Preserve the shared recorder and dependency lockfile.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* chore(deps): update http to 1.6.0

Align the workspace and standalone fuzz manifests and lockfiles on http 1.6.0.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* fix(deps): refresh Cargo dependencies and preserve HTTP values

Refresh registry constraints and lockfiles. Preserve legacy opaque ETags and response headers with byte validation while retaining POST and signed override validation.

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: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 16:06:38 +08:00
Hauser Zhi 6b014ec215 feat(capacity): read usage directly on dedicated mounts (#9840)
* feat(capacity): read usage directly on dedicated mounts

Allow operators of dedicated filesystems to use block usage for background
capacity estimates. Reuse the existing blocking scan and cache update
paths so a successful probe establishes the per-disk baseline.

Refs: rustfs/rustfs#9837
Refs: rustfs/backlog#3399

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* refactor(capacity): verify whole mounts before reading usage

Share mount eligibility across a refresh and read allocated blocks
through the checked directory descriptor. Rebuild a complete per-disk
baseline when the local disk set changes.

Refs: rustfs/rustfs#9837
Refs: rustfs/backlog#3399

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* fix(capacity): discard stale topology on bounded refresh

Reconcile a scheduled full refresh against the topology it scanned.
Represent baseline completeness with the per-disk map and compute
aggregate totals in one pass.

Refs: rustfs/rustfs#9837
Refs: rustfs/backlog#3399

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* fix(capacity): restrict direct reads to isolated filesystem types

Use the filesystem type from the existing descriptor-based statfs
call to keep shared-pool accounting out of the direct mount path.
Cover directory fallback and symlinked mount roots.

Refs: rustfs/rustfs#9837

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: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 16:06:30 +08:00
cxymds 152d9a39cc fix(lock): reap expired local leases every second per shard (#9836) 2026-12-02 00:13:17 +08:00
Hauser Zhi 9fe640ff3f perf(scanner): validate durable directory progress once (#9833)
* perf(scanner): validate durable directory progress once

Reuse the verified directory manifest for both listing and compacted progress. Compare saved bucket progress once per local turn and skip the initial snapshot when remote durable progress cannot be reported.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(scanner): bound directory progress lookups by path

Match checkpoint progress within each parent path while retaining exact replica and manifest checks. Search ancestor paths for compacted coverage and keep the direct path for single records.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(scanner): skip redundant snapshot coverage checks

Use the sealed frontier when available and validate only compacted receipts whose ranges can cover a missing frontier.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(scanner): reuse frontier digest at leader handoff

Validate the saved frontier once during checkpoint preparation and reuse its digest when retaining or migrating an accepted receipt. Preserve exact scope checks and validate legacy digest domains before migration.

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: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 00:13:11 +08:00
Hauser Zhi aa8820e87a fix(ecstore): bind shard proof cache to part identity (#9829)
* perf(ecstore): avoid rechecking authenticated shard proofs

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* fix(ecstore): bind shard proof cache to part identity

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: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 00:12:58 +08:00
Hauser Zhi 82b9897641 fix(quota): reclaim stranded v2 shard credits (#9812)
* fix(quota): reclaim stranded v2 shard credits

Recheck the requester after upgrading to an exclusive allocator lock.
Reclaim whole donor grants through ordered, fenced ledger writes and
publish the requester's reservation under the same allocator guard.
Use accounted bucket usage when quota admission is denied.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(quota): use one allocator read for warm v2 admission

Keep bootstrap and reservation in one admission flow. Persist each
empty requester before issuing its first regular grant, and issue
only its required growth at the start of the epoch. Avoid writes for
denied lazy requests and skip unnecessary donor normalization.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(quota): reuse recovered v2 credit under shared locking

Probe orphan owners outside the allocator and shard locks. Apply
recovery and a fitting reservation in one shard write. Drain any
commit-started orphan publication before accounting its live bytes.

Fund donor-backed refills with the exact shortfall so other shards
can draw on the returned excess, including after interrupted donor
preparation.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(quota): plan v2 donor reclaim before fencing shards

Overlap bounded read-only donor lookups under the exclusive allocator.
Fence and reread only when candidate grants can cover the requester.
Keep incomplete plans off disk and prefer the smallest single grant
that satisfies the deficit.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* chore(deps): update sha2 to 0.11.3

Replace the yanked 0.11.2 resolution while preserving the existing
0.10 dependency line and the rest of the locked dependency graph.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* chore(deps): refresh workspace dependency pins

Align the workspace requirements for sha2, aws-sdk-s3, and sysinfo
with the resolved versions. Refresh the compatible transitive pins
selected by Cargo.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* test(ci): give deep storage regressions a 4 MiB stack

Use the existing nextest stack setup for the eight real-store tests
reported to overflow Linux libtest threads. Match each test exactly
in the local and CI profiles.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* chore(deps): use published rustfs-uring 0.4.0

Replace the Git revision with the crates.io release containing the
same completion-owner and atomic-update implementation. Keep fault
injection limited to Linux test builds.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* chore(ci): propose renewal of three RustSec exceptions

Set the proposed expiration to 2027-02-01T23:59:59Z for:

- RUSTSEC-2026-0542: humantime =2.4.0
- RUSTSEC-2026-0543: chrono =0.4.45
- RUSTSEC-2026-0555: chrono-tz =0.10.4

Keep the existing approval metadata. The security gate still requires
independent maintainer approval for the new expiration.

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: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 00:07:37 +08:00
Hauser Zhi adc7a7abaa perf(scanner): reuse checkpoint commit revisions (#9809)
* perf(scanner): reuse checkpoint commit revisions

Use the ETag from each successful conditional write as the next
checkpoint revision. Recover ambiguous results and their revisions
from the same byte-verified read. Probe only an unknown backup and
require a bucket reload when the primary commit has no revision.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(scanner): stream checkpoint body comparisons

Share an exact bounded comparison for ambiguous writes and reused
backup pages. Stop at the first mismatch and require EOF before
using a read-back to confirm a committed revision.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* test(ci): align storage fixtures with workspace test budgets

Give affected real-store tests the existing bounded stack. Reserve
the test runner for each twelve-drive reconstruction fixture without
changing its deadline. Assert full metadata fanout and the typed
post-quorum timeout for a paused disk.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* ci(fuzz): bound instrumented Cargo build concurrency

Limit the selected fuzz harness build to two Cargo jobs, matching
the workspace build budget on the same runner class. Keep the
sanitizer, selected targets and smoke verdict in force.

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: qunjiazhu <qunjiazhu@gmail.com>
2026-12-02 00:07:25 +08:00
GatewayJ 768b7cf58a fix(s3): check RDMA GET sink bounds before IO and defer PUT prefetch (#9801)
Validate S3 read preconditions and RDMA client buffer bounds before opening segmented GET sinks or cold-fill producers, map CuObjectError::TokenTooSmall to InvalidRange, defer RDMA PUT read-ahead until the body stream is polled, and start the local NIXL agent when RUSTFS_INTERNODE_DATA_TRANSPORT=nixl is configured standalone.
2026-12-02 00:07:07 +08:00
Hauser Zhi abef536caa fix(scanner): accept durable receipts across local epochs (#9830)
* fix(scanner): accept durable receipts across local epochs

Compare the signed checkpoint identity without requiring the worker and leader to share a process-local publication epoch. Keep the worker identity for observation validation and retain tier registry negotiation.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* test(scanner): expose signed receipt regression evidence

Bind the signed receipt regression to the USAGE-23 native acceptance case.

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: qunjiazhu <qunjiazhu@gmail.com>
2026-12-01 16:32:38 +08:00
dependabot[bot] 092c865185 fix(deps): resolve RUSTSEC-2026-0620 and refresh dependencies (#9796) 2026-11-30 22:42:53 +08:00
Ramakrishna Chilaka 1aa042b2e3 perf(ecstore): cache bucket incarnation under guard and trim UploadPart head checks (#9791) 2026-11-30 22:42:39 +08:00
icediceice 8863d2ddd0 fix(quota): let v1 recounts survive concurrent writes (#9789)
A v1 hard-quota bucket under steady writes could stay full after deletes: deletes give no credit, and every recount was dropped when a reservation was pending at its seed or any writer saved the ledger during its walk. Zero-growth overwrites save the ledger too.

On a single-pool store a recount now stores a scan_seed token at its seed and remembers the seed balance minus pending growth. If the token survives, it publishes the scan plus all growth admitted since the seed. Only reserve and abort move the v1 balance, so the write path is unchanged and the result can only over-count. Pending reservations and the reap cursor are kept; reconcile_required is cleared only when no writer saved since the seed.

The recount now sums usage over walk_authoritative, so all versions of a key come from one metadata entry; the paged version listing could skip a suspended null overwrite that re-sorted ahead of its version marker.

A recount is scheduled on every denial whose growth fits the limit and when an admission crosses 90% of it. Admission compares in u128, so a stale balance near u64::MAX is a quota denial, not corruption.

Multi-pool stores and mismatched or missing ledgers keep the strict path, since pool moves publish versions without a reservation. scan_seed is omitted while idle, so the ledger format is unchanged for older nodes, and an older node's rewrite drops it, which discards the in-flight recount. The vector maintenance quota observer accepts scan_seed in its strict ledger schema.

Co-authored-by: icediceice <icediceice@users.noreply.github.com>
2026-11-30 21:17:55 +08:00
Hauser Zhi baa09338ea fix(scanner): keep checkpoints usable without backup quorum (#9808)
Refresh the primary checkpoint revision even if the best-effort
backup cannot be read. Keep an unknown backup revision out of CAS
writes and avoid probing it when reacquiring the cache lease.

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
2026-11-30 21:17:30 +08:00
RustFS d82bf5b1f5 fix(ecstore,scanner,heal): fix rolling, grey-fault, and scanner bugs (#9804)
* fix(ecstore,rustfs): fix rolling restarts, health probe, and request_id

- Unpin STREAM_AUTH_PINNED_ENDPOINTS on authenticated peer boot_epoch
  rotation (probed via signed Ping on legacy-downgraded streams) while
  remaining fail-closed for unauthenticated downgrades under unchanged
  epochs, fixing 1.0.8 -> 1.0.7 rollback stream-auth failures.
- Probe peer boot_epoch and re-sign replay scope headers on transient
  internode gRPC Unauthenticated errors during same-version restarts.
- Propagate online_drives_strict onReadQuorum retry hints and treat
  transient transport disconnects during quorum reads as retriable shard
  unavailable errors instead of immediate 503 SlowDown.
- Evaluate live erasure set read/write quorums across local and remote
  drives in /minio/health/cluster and /minio/health/cluster/read so a
  2/4-node outage returns HTTP 503 instead of a false-healthy 200.
- Propagate S3 x-amz-request-id end-to-end across internode gRPC and
  HTTP storage RPC boundaries for cross-node observability correlation.

Refs: https://github.com/rustfs/backlog/issues/3390

* fix(connect,release): raise symbol caps, compact 1GiB set, sync 1.0.8

- Raise GNU symbol-catalog budgets (aarch64-gnu 48 MiB, x86_64-gnu
  56 MiB) in crates/connect-symbol-catalog to accommodate expanded
  workspace symbol tables.
- Switch low-RAM (<= 2 GiB cgroup/host) CPU profile symbolizer fallback
  to a compact Vec<(u64, u64, Box<str>)> sorted address table so 1 GiB
  hosts never OOM during CPU profile symbolization.
- Synchronize workspace Cargo.toml, Cargo.lock, flake.nix, rustfs.spec,
  and helm/rustfs/Chart.yaml versions to 1.0.8.

Refs: https://github.com/rustfs/backlog/issues/3390

* fix(filemeta,scanner,heal): stabilize xl.meta, MRF fairness, telemetry

- Sort HashMap entries deterministically before MessagePack encoding in
  FileMeta::encode_to so healed and re-encoded xl.meta shards produce
  identical byte layouts and HighwayHash/CRC checksums across nodes.
- Classify confirmed object absence in MRF heal execution as terminal
  instead of looping recreate_failed retries, and enforce anti-starvation
  fairness for Scanner and ReadRepair lanes under MRF High bursts.
- Expose executed heal counters by source (MRF, Scanner, ReadRepair) in
  MRF status endpoints and export dirty_pending_buckets / scanner cycle
  telemetry in scanner activity snapshots.

Refs: https://github.com/rustfs/backlog/issues/3390

* fix(ecstore): bound 3x4 SIGSTOP stalls with hedging and host fast-fail

- Hedge multi-pending shard reads and read_xl_meta quorum fetches across
  remaining drives instead of stalling behind a single SIGSTOP'd node,
  and bound post-quorum write/delete straggler grace windows.
- Record peer straggler timeouts into host fast-fail windows and apply
  host fast-fail on read retries (including IgnoreFailure attempt 0) so
  subsequent operations bypass hung peers immediately.
- Allow .rustfs.sys metadata read-repair staging under a shared lock so
  a hung peer cannot hold an exclusive write lock for 10s across bucket
  validation paths.
- Switch SetDisks::stat_bucket_with_quorum from join_all to
  FuturesUnordered early-return on presence quorum or strict-majority
  absence so bucket existence revalidation after TTL expiry never blocks
  on a SIGSTOP'd peer.

Refs: https://github.com/rustfs/backlog/issues/3390

* test(ecstore): wire real-ECStore multipart DST cutpoints and SimDisk

- Wire opt-in DST crash cutpoints (MultipartBeforeQuorumRename,
  MultipartMidQuorumRename, MultipartAfterCommitBeforeCleanup) directly
  into SetDisks::complete_multipart_upload_inner and add transactional
  part staging/commit support in DstSimDisk.
- Add real-ECStore deterministic crash-recovery tests verifying
  all-or-nothing multipart visibility and convergent post-crash cleanup.

Refs: https://github.com/rustfs/backlog/issues/3390

* fix(ecstore,fuzz): fix test clippy lint and sync fuzz/Cargo.lock

- Replace index range loop over errs in 3x4 SIGSTOP metadata read test
  with errs.iter().enumerate().take(4) to satisfy clippy --all-targets.
- Sync workspace crate versions to 1.0.8 in fuzz/Cargo.lock so --locked
  fuzz harness checks succeed.
2026-11-30 20:36:16 +08:00
cxymds c09643a2d9 feat(obs): export remote tier inventory and 24h transition gauges (#9803) 2026-11-30 20:35:53 +08:00
GatewayJ 840582da85 fix(nixl): isolate internode peer cache and verify write offsets (#9800)
Partition RemoteCache registrations by PeerRole (S3Client vs Internode), require signed SHA-256 metadata verification on internode NIXL RPCs, and carry signed nixl_offset on multi-segment shard writes so declared sizes are checked end-to-end.
2026-11-30 20:35:08 +08:00
cxymds ff4f38b1b2 fix(ecstore): replace older null delete marker on suspended delete (#9799)
* fix(ecstore): replace older null delete marker on suspended delete

When a versioning-Suspended bucket already has an older null delete
marker below a newer non-null version, a versionless DeleteObject or
DeleteObjects request sends a null marker write with empty replication
and purge state. FileMeta::delete_version_inner treats that shape as an
in-place replication write-back on the existing null delete marker,
leaving the old timestamp in place and keeping the newer version latest.

Detect the older null delete marker during the existing
check_null_version_object_lock_delete lookup (zero extra disk reads) and
prepend a plain null removal ahead of the new null delete marker inside
the same per-key delete_versions prepare/commit/rollback group so both
old and new drives apply the mutation identically during rolling
upgrades. Chunk recoverable and guarded delete_versions batches to keep
each disk RPC within the 1,000 group/mutation limit.

Fixes #9713

* test(ecstore): route replication state fixtures through bucket boundary
2026-11-30 20:34:47 +08:00
cxymds 1b557aa336 fix(heal): fence non-replacement auto bucket repair by incarnation (#9798)
Prevent unclean-shutdown and non-replacement AutoHeal erasure-set tasks from recreating buckets deleted after the startup snapshot by validating live bucket incarnations under the lifecycle fence, mapping retired generations to BucketNotFound/StaleBucketIncarnation, and returning Ok(None) on missing buckets in ECStoreHealStorage.
2026-11-30 20:34:27 +08:00
overtrue 4bd6f42adb fix(scanner): fence prefix usage cache fills across invalidation
Forward-port rustfs/rustfs#9566 (commits c59d8e48c and b74dff76c from 1.0.7) to prevent an in-flight prefix usage computation from overwriting a newer or invalidated cache entry.

Refs: rustfs/backlog#3289
2026-11-30 08:47:19 +08:00
overtrue 30aa093f21 test(ecstore): cover single-pool non-elected follower bootstrap convergence
Add deterministic unit tests exercising a single-pool non-elected bootstrap observer through identity establishment, pending-identity waiting, and V3 pool.bin convergence without latching write_blocked, plus negative controls ensuring initialized-missing and corrupt identities latch RecoveryRequired permanently.

Refs: rustfs/backlog#2384
2026-11-30 08:39:42 +08:00
overtrue 27a249c74b fix(heal): retire timed-out admin root recovery intents
Treat HealTaskStatus::Timeout as terminal completion so admin heals persist a terminal receipt and remove their pending root-heal intent instead of permanently blocking subsequent non-forceStart admin heals with HTTP 409 AlreadyRunning.

Refs: rustfs/backlog#3376
2026-11-30 08:24:27 +08:00
RustFS 4b3aa10b05 fix(pools): fix handle_make_bucket_inner arity and Linux NotifyState::Other (#9788)
* fix(ecstore): pass managed argument when forwarding live_store make_bucket

* fix(server): use NotifyState::Other for Linux systemd MONOTONIC_USEC reload state

* fix(s3,ecstore): exclude vector prefix from owner read fast path and bound make_bucket stack frame
2026-11-30 07:08:51 +08:00
Hauser Zhi e89c5db7a7 chore(deps): refresh Cargo dependencies (#9778)
* chore(deps): refresh Cargo dependencies

Refresh compatible workspace dependencies, align the fixed zstd adapter, and keep the vendored HTTP/2 Expect backport active.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* chore(deps): upgrade DataFusion and TAR dependencies

Adapt S3 Select to DataFusion 56 while preserving field depth and function error contracts. Update TAR fixtures for the decoder API and hold compatible Hotpath and NIXL HTTP versions.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* fix(tests): restore Iceberg and IAM test compilation

Pass Arrow metadata arrays directly and update Vector IAM fixtures to use ArcSwap while preserving policy state restoration.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* fix(ci): select only Cargo workspace members

Keep excluded path crates in the dependency graph for reverse impact analysis. Require the corrected plan contract and fall back to full workspace validation when the trusted base planner is older.

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: qunjiazhu <qunjiazhu@gmail.com>
2026-11-30 00:02:28 +08:00
Hauser Zhi 6cabc2fc40 fix(ecstore): reject incomplete erasure reconstruction (#9770)
* fix(ecstore): reject incomplete erasure reconstruction

Require exact shard geometry and complete data for zero parity. Reject
missing decode backends and enforce the source quorum for verified
reconstruction while preserving recoverable exact-quorum reads.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(ecstore): streamline erasure reconstruction

Validate shard geometry and presence once at the reconstruction boundary.
Skip payload inspection for complete data and use direct indexed access
when extracting recovered legacy shards. Preserve quorum, parity
verification, and HotPath attribution for verified reads.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(ecstore): avoid parity copies in verified reads

Compare surviving parity against regenerated bytes without cloning or
overwriting the sources. Reuse the SIMD workspace for legacy parity and
use one contiguous scratch buffer for modern parity. Still materialize
missing parity and reject inconsistent sources before stripe emission.

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* chore(ci): shrink error formatting baseline

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* test(iam): use ArcSwap for policy plugin state

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* fix(ecstore): enforce empty shard quorum and stage parity

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: qunjiazhu <qunjiazhu@gmail.com>
Co-authored-by: RustFS <hello@rustfs.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
2026-11-29 23:51:29 +08:00
RustFS 54779fa132 feat(pools): add maintenance mode, config/preflight checks, and zero-downtime live hot-reload (#9755)
* feat(pools): add maintenance mode, config/preflight checks, and zero-downtime live hot-reload

* fix(admin): restrict pool check/preflight to DecommissionAdminAction and harden audit logging

* fix(pools): harden security, pending-commit retry convergence, cutover isolation, and subsystem handoff

* feat(gateway): bump rustfs/gateway pin to ac50e9af and mount pool hot-reload native routes

* style(ecstore): sort conditional import in local commit module

* fix(ecstore): replace Error::other(format!) in pool reload with stable typed errors

* test(pools): avoid literal PEM header in non-env config redaction test
2026-11-29 23:51:14 +08:00
RustFS 701ed1227f feat(ecstore,fuzz): wire opt-in SimDiskIo DST backend & add 6 differential cargo-fuzz targets (#9763) 2026-11-29 22:48:50 +08:00
唐小鸭 c69885320b fix(replication): drop the total wall-clock budget on resync walks (#9785) 2026-11-29 22:47:31 +08:00
Ramakrishna Chilaka 7117138566 perf(s3,sse): gate SseKmsPrincipal condition map on key policy enforcement and reuse on GET (#9784) 2026-11-29 22:41:43 +08:00
Chris An 66f0bcdfa4 test(e2e): verify degraded multipart abort and recovery (#9783) 2026-11-29 22:41:29 +08:00
Chris An 923264f3e1 test(ci): fix three workspace test failures (#9777) 2026-11-29 22:40:51 +08:00
Ramakrishna Chilaka 8146d54362 perf(ecstore): cache FormatInfo slot cohort and trim multipart/delete prep overhead (#9776) 2026-11-29 22:40:31 +08:00
Zhi Zhi 5ae62b1f34 fix(storage): remove IoPriorityQueue ABBA with single-lock state (#9773) 2026-11-29 22:36:40 +08:00
Zhi Zhi 1034f5ac75 perf(tracing): trace remaining hot data-plane spans (#9772)
* perf(obs): trace remaining hot data-plane spans

Extend the explicit trace-level rule to the remaining repetitive object, bucket, list, notification, rebalance, decommission, heal, and scanner spans. Together with the first commit, 126 call sites across 36 files now use trace; lifecycle and admin spans keep INFO.

This completes one consistent span-level policy for per-object and per-iteration paths without changing control flow, fields, or error handling.

* fix(ecstore): route test storage-api import through contracts

The prepared-reader test imported ObjectOperations directly from rustfs_storage_api, which violates the architecture migration rule requiring ECStore modules to route storage-api symbols through storage_api_contracts. Use the existing domain-level re-export, matching other tests in this module.
2026-11-29 20:08:09 +08:00
Chris An 4e624f4d24 perf(gateway): avoid duplicate authz and stack cloning on object reads (#9761)
* perf(gateway): avoid duplicate authz and stack cloning on object reads

* fix(gateway): capture ODM read generation before early policy evaluation

* fix(server): keep exclusive edge dispatch shape via Arc::make_mut
2026-11-29 20:07:57 +08:00
Hauser Zhi 1a2825265e fix(targets): retain queued events after replay read failures (#9765)
* fix(targets): retain queued events after replay read failures

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(targets): replay built-in queue entries with one read

Co-Authored-By: heihutu <heihutu@gmail.com>
Co-Authored-By: zhi22915 <qiuzgang@gmail.com>
Co-Authored-By: qunjiazhu <qunjiazhu@gmail.com>

* perf(targets): skip replay scans while queue entries cool down

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: qunjiazhu <qunjiazhu@gmail.com>
2026-11-29 18:12:13 +08:00
Chris An f45b2c07e8 fix(server): raise internode HTTP/2 reset limit for cluster peers (#9759)
* fix(server): raise internode HTTP/2 reset limit for cluster peers

* fix(server): make peer IP DNS refresh non-blocking with strict TTL expiry
2026-11-29 18:07:52 +08:00
GatewayJ 0b7988c37d feat: add S3 Vectors service integration (#9476)
* feat(vector): integrate S3 Vectors catalog and APIs

Add scoped Vector resources, managed Lance storage, IAM checks, and
Gateway REST JSON operations with compatibility and recovery tests.

* fix(vector): adapt owned requests and preserve native quota errors

* test(ci): exercise Vector KMS archive consumers

* feat(vector): add maintenance and recovery workflows

* test(multipart): assert typed quota refusal causes

Verify the retained quota cause and its current and limit values alongside the existing refusal-order assertions. Remove the retired authentication compatibility entry after the main rebase.

* fix(vector): move maintenance dispatch guard ownership

Retain the namespace guard in the returned maintenance owner. Synchronize Gateway dependencies for corpus recording and format the existing audit test in its external module.

* feat(vector): add shared pagination sessions

* fix(vector): bound managed request and catalog futures

* test(vector): adapt managed fixtures to Gateway request envelopes

* test(vector): verify maintenance across uniform deployments

* test: simplify SSE-C counting and Catalog fixture ownership

* fix(test): propagate owned device validation errors

* fix(auth): bound early authorization futures

* feat(vector): complete resource pagination and bucket retirement

* fix(vector): harden bucket lifecycle, retirement, authz, and layering

Preserve continuous bucket incarnation fencing across Vector bucket Catalog parent initialization, map deleted-bucket races during DeleteVectorBucket to NotFoundException, and re-evaluate IAM, resource policies, and ABAC bucket tags inside the storage bucket lock across all five Vector bucket mutations.

Scale used-bucket Catalog retirement proof, plan, and execution linearly across multi-resource multi-page histories, sweep uncommitted pre-authority page artifacts before rewriting authority records, enforce manifest completeness and immutable delete-intent source-copy identity, and allow same-name recreation over v4 deleted Vector tombstones.

Make ListVectorBuckets and ListIndexes resilient to concurrent deletions with single-pass bucket authorization and bounded sparse-prefix scan budgets, preserve literal plus characters when decoding UntagResource tagKeys query parameters to match Gateway SigV4 canonicalization, and normalize operation-scoped Kms*Exception codes across all 21 S3 Vectors APIs.

Extract ManagedLanceObjects into app::vector_usecase::managed_objects, inject background node admission into Vector maintenance startup to eliminate the app-composition cycle, and widen scripts/check_layer_dependencies.sh to detect inline reverse-layer crate paths while recording the 12 pre-existing non-Vector inline edges from main in scripts/layer-dependency-baseline.txt (backlog#1834) with zero Vector exemptions.

* chore(vector): remove Batch 1 dead code and test debug residue

* chore(vector): remove Batch 2 dead test code and gate test-only APIs

* refactor(vector,iam): simplify dead branches and pass-through wrappers

* fix(object,test): bound PutObject futures and cover reconciled routes

* feat(vector,object,connect): activate S3 Vectors and fix CI regressions

* test(object,vector): fix copy future size check and vector dispatch test
2026-11-29 18:07:23 +08:00
Zhi Zhi 5a331bacae perf(ecstore): trace object write and delete spans (#9771)
Set explicit trace level on 60 object write, delete, and multipart span call sites across the facade, store, set, disk, and Swift protocol layers. Lifecycle and admin spans keep their existing INFO level.

This avoids recording bucket and object span fields on hot paths at the default INFO log level while leaving error events and lifecycle observability unchanged.
2026-11-29 18:06:23 +08:00