Commit Graph

8540 Commits

Author SHA1 Message Date
Ramakrishna Chilaka c249183ae2 perf(data-usage): avoid redundant entry clones and key allocs in usage cache (#9741) 2026-11-29 10:42:41 +08:00
Ramakrishna Chilaka 1490c0c57b perf(common): fast-path MRF coalescer hits and reuse Arc keys on release (#9739) 2026-11-29 10:42:30 +08:00
Ramakrishna Chilaka 72baa7973f perf(credentials): fast-path service account checks and Masked formatting (#9738) 2026-11-29 10:42:16 +08:00
Ramakrishna Chilaka ac922fb514 perf(notify): fast-path empty subscriber checks and zero-alloc glob matching (#9737) 2026-11-29 10:42:03 +08:00
Ramakrishna Chilaka 1469af9f2a perf(io-metrics): cache S3 operation counter handles and borrow static labels (#9736) 2026-11-29 10:41:49 +08:00
Ramakrishna Chilaka 2576307d01 perf(lifecycle): filter rules by reference and deduplicate tag and lock checks (#9735) 2026-11-29 10:41:36 +08:00
Ramakrishna Chilaka 5236d31055 perf(replication): avoid rule clones and repeated tag decoding in rule evaluation (#9734)
* perf(replication): avoid rule clones and repeated tag decoding in rule evaluation

* fix(replication): pass compare_actionable_rules directly to sort_by
2026-11-29 10:41:24 +08:00
Ramakrishna Chilaka 7110cf1d88 perf(s3-types): avoid single-frame copy in store_all_limited and pre-size error XML (#9732) 2026-11-29 10:41:10 +08:00
Ramakrishna Chilaka c5796f2c05 perf(checksums): encode base64 header values on stack without String allocation (#9731) 2026-11-29 10:40:57 +08:00
Ramakrishna Chilaka 82e595aad6 perf(policy): defer variable resolver cloning and fast-path static resource matching (#9726) 2026-11-29 10:40:09 +08:00
Ramakrishna Chilaka 2de04eeaf9 perf(filemeta): avoid redundant clones and reallocations in metacache (#9725)
* perf(filemeta): avoid redundant clones and reallocations in metacache

* fix(filemeta): avoid Copy derive on MetaCacheHealCandidateKind
2026-11-29 10:39:55 +08:00
Ramakrishna Chilaka 93eca3e79d perf(io-core): make progress and backpressure state checks lock-free (#9724) 2026-11-29 10:39:40 +08:00
Ramakrishna Chilaka 8a5fd2c260 perf(utils): avoid string allocations in header classifiers and path helpers (#9723) 2026-11-29 10:39:20 +08:00
RustFS d620ecfa5f fix(ecstore): enforce WORM delete and sync peer rebalance completion (#9710)
* fix(ecstore): enforce WORM lock before rebalance delete skip

Evaluate read-only Object Lock deletion admission on rebalancing and suspended pools before writer pool-lookup skipping or batch rebalance source-pool skipping so WORM-protected versions deterministically fail with PrefixAccessDenied (HTTP 403 AccessDenied) instead of SlowDown (HTTP 503), VersionNotFound (HTTP 204), or false batch Deleted entries.

Fixes rustfs/backlog#3383

* fix(ecstore): propagate terminal rebalance reload to peer nodes

Broadcast notification_sys.load_rebalance_meta_failures(false) after autonomous pool rebalance workers persist Completed or Failed terminal state, and merge same-run metadata reloads monotonically so peer nodes clear is_pool_rebalancing without clobbering active pool progress.
2026-11-29 10:38:49 +08:00
Chris An 9170a88dc8 fix(gateway): preserve Object Lock offset, enforce metadata listing SSE/metrics, and synthesize Host in early authorizer (#9705)
* fix(gateway): align Object Lock offset, metadata listing SSE/metrics, and H2/H3 Host authz

Signed-off-by: Chris An <anzhengchao@gmail.com>

* fix(gateway): align Object Lock offset, metadata listing SSE/metrics, and H2/H3 Host authz

Signed-off-by: Chris An <anzhengchao@gmail.com>

* fix(gateway): align Object Lock offset, metadata listing SSE/metrics, and H2/H3 Host authz

Signed-off-by: Chris An <anzhengchao@gmail.com>

* fix(gateway): align Object Lock offset, metadata listing SSE/metrics, and H2/H3 Host authz

Signed-off-by: Chris An <anzhengchao@gmail.com>

* fix(gateway): align Object Lock offset, metadata listing SSE/metrics, and H2/H3 Host authz

Signed-off-by: Chris An <anzhengchao@gmail.com>

* fix(gateway): align Object Lock offset, metadata listing SSE/metrics, and H2/H3 Host authz

Signed-off-by: Chris An <anzhengchao@gmail.com>

---------

Signed-off-by: Chris An <anzhengchao@gmail.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
2026-11-29 10:38:28 +08:00
Chris An 5a0bdfcf1c fix(security): harden RPC, proxies, egress DNS, and OIDC (#9682)
* fix(security): harden RPC, proxies, egress DNS, and OIDC

Harden internode RPC authentication/quotas, trusted-proxy allowlisting,
protocol IAM policy conditions, outbound DNS egress pinning, and OIDC
redirect and HTTPS enforcement:

- Trusted proxies: replace broad private/link-local peer trust in simple
  mode with the configured trusted-proxy allowlist (defaulting to
  loopback-only) and update proxy integration coverage.
- Protocol gateways & FTPS: populate standard IAM condition keys
  (SourceIp, SecureTransport, CurrentTime, EpochTime, UserAgent,
  Referer, principal metadata) in gateway authorization and replace the
  unchecked FTPS fallback IP parse with explicit connection context.
- Bucket listing RPC: fail closed with entry index diagnostics instead
  of silently dropping malformed BucketInfo entries on encode/decode.
- Internode RPC streams & replay cache: add framed HMAC-SHA256 response
  authentication with sequence/digest/EOF verification and
  post-verification endpoint pinning for read_file_stream and walk_dir,
  plus canonicalized per-peer entry and memory-budget replay cache
  isolation.
- Outbound DNS egress: unify storage/tier, remote S3 replication
  targets, on-demand migration HTTP, Azure Blob, GCS, Keystone, and OIDC
  outbound checks onto OutboundPolicy and connection-time
  OutboundDnsResolver (with redirect blocking on Keystone) to stop DNS
  rebinding to loopback/link-local/metadata targets.
- OIDC redirects & transport security: trust forwarded scheme/host only
  from verified trusted proxies, never reflect untrusted request headers
  into STS credential or logout redirects, and reject plaintext http://
  OIDC URLs for non-loopback hosts unless explicitly opted in via
  RUSTFS_IDENTITY_OPENID_ALLOW_INSECURE_TRANSPORT.

Refs: rustfs/backlog#1470, rustfs/backlog#1473, rustfs/backlog#1472, rustfs/backlog#1506

* fix(egress): restrict GCS endpoints and restore tier compatibility

* ci: tighten the GCS error-format baseline

* fix(ci): stop sending deprecated policy field in s3-tests add-user

rustfs/rustfs#9677 hardened /rustfs/admin/v3/add-user to fail closed when a non-empty deprecated policy field is provided. scripts/s3-tests/run.sh was still passing policy=readwrite in the add-user body even though it immediately calls set-user-or-group-policy right after, and awscurl returned exit 0 on XML <Error> responses so provisioning silently failed and broke all alt-user s3-tests.

Remove the deprecated policy field from the add-user payload, check awscurl responses for XML <Error> elements in provisioning, and add a regression unit test in scripts/s3-tests/test_runner_tools.py.

Refs: rustfs/backlog#1246

* fix(ci): fail S3 user provisioning on HTTP errors without logging responses

* fix(iceberg): reject repeated warehouses before validating bucket names

* test(ecstore): wait for relaxed writes on the foreground lane

* test(quota): isolate concurrent real-disk probes in CI

* test(ecstore): scope upload lock identity helper to its Linux test

* fix(oidc): preserve HTTPS in dynamic callbacks

* ci: allow cold builds to finish all fuzz binaries
2026-11-29 10:23:40 +08:00
Chris An 21fc821938 chore(deps): bump rustfs/gateway pin to b6007d13 (#9683)
* chore(deps): bump rustfs/gateway pin to b6007d13

* fix(ci): stop sending deprecated policy field in s3-tests add-user

rustfs/rustfs#9677 hardened /rustfs/admin/v3/add-user to fail closed when a non-empty deprecated policy field is provided. scripts/s3-tests/run.sh was still passing policy=readwrite in the add-user body even though it immediately calls set-user-or-group-policy right after, and awscurl returned exit 0 on XML <Error> responses so provisioning silently failed and broke all alt-user s3-tests.

Remove the deprecated policy field from the add-user payload, check awscurl responses for XML <Error> elements in provisioning, and add a regression unit test in scripts/s3-tests/test_runner_tools.py.

Refs: rustfs/backlog#1246

* fix(ci): fail S3 user provisioning on HTTP errors without logging responses

* fix(iceberg): reject repeated warehouses before validating bucket names

* test(ecstore): wait for relaxed writes on the foreground lane

* test(quota): isolate concurrent real-disk probes in CI

* test(ecstore): scope upload lock identity helper to its Linux test

* ci: allow cold builds to finish all fuzz binaries
2026-11-29 09:50:12 +08:00
Chris An e91d961f45 test(security): expand authz, OIDC, table LIST, and audit coverage (#9686)
* test(security): expand authz, OIDC, table LIST, and audit coverage

Add end-to-end, integration, and property-based security regression suites
closing in-repo RustFS test gaps across authorization, table-bucket LIST
isolation, OIDC web-identity federation, streaming SigV4 chunks, multipart
checksum algebra, and auth-failure audit delivery:

- Add table-bucket LIST isolation E2E tests across ListObjectsV2,
  ListObjectVersions, and ListMultipartUploads covering delimiter
  CommonPrefixes, opaque cursor confidentiality, cursor-attack rejection,
  and >1000-object all-hidden raw page traversal.
- Wire fast delete_authorization_test, table_list_isolation_test,
  oidc_web_identity_e2e_test, and auth_failure_audit_test cases into
  .config/nextest.toml e2e-smoke (updating e2e-smoke/e2e-full selection
  digests and raising security-smoke-floor to 29).
- Expand delete_authorization_test with anonymous force-delete / spoofed
  REPLICA denial and Object Lock (GOVERNANCE bypass, COMPLIANCE, Legal
  Hold) enforcement regressions.
- Add OIDC AssumeRoleWithWebIdentity E2E matrix (E2E-01..E2E-13, multi-
  audience, inline session-policy intersection) and rustfs-iam web-identity
  integration tests (tampered payload, alg=none, HS256 confusion,
  malformed/missing-iss tokens, OTHER_AUDIENCES, concurrent JWKS rotation,
  multi-provider routing, refresh_token flow, and iat/exp/nbf boundaries).
- Add signed aws-chunked truncated-terminator and reordered-chunk negative
  E2E tests (PutObject and UploadPart), multipart ETag-of-ETags and
  COMPOSITE/FULL_OBJECT checksum proptests in rustfs-rio and rustfs-ecstore,
  live audit webhook denial delivery tests (with honest characterization of
  gateway SignatureDoesNotMatch auditing), and fuzz/proptest + GHSA
  regression admission rules in AGENTS.md and adversarial-validation.md.

Refs: rustfs/backlog#2675, rustfs/backlog#2724, rustfs/backlog#1151

* test(security): bound listing checks and allow new audit events

* fix(ci): stop sending deprecated policy field in s3-tests add-user

rustfs/rustfs#9677 hardened /rustfs/admin/v3/add-user to fail closed when a non-empty deprecated policy field is provided. scripts/s3-tests/run.sh was still passing policy=readwrite in the add-user body even though it immediately calls set-user-or-group-policy right after, and awscurl returned exit 0 on XML <Error> responses so provisioning silently failed and broke all alt-user s3-tests.

Remove the deprecated policy field from the add-user payload, check awscurl responses for XML <Error> elements in provisioning, and add a regression unit test in scripts/s3-tests/test_runner_tools.py.

Refs: rustfs/backlog#1246

* fix(ci): fail S3 user provisioning on HTTP errors without logging responses

* fix(iceberg): reject repeated warehouses before validating bucket names

* test(ecstore): wait for relaxed writes on the foreground lane

* test(quota): isolate concurrent real-disk probes in CI

* test(ecstore): scope upload lock identity helper to its Linux test

* ci: allow cold builds to finish all fuzz binaries
2026-11-29 09:50:04 +08:00
Chris An c673245190 fix(helm): provide writable temporary storage for scanner restores (#9687)
* fix(helm): provide writable temporary storage for scanner restores

Paged usage checkpoints larger than 1 MiB need a temporary file during restore. Mount a disk-backed emptyDir at /tmp in each RustFS pod and honor existing mounts on upgrade.

Fixes #9672

* fix(ci): stop sending deprecated policy field in s3-tests add-user

rustfs/rustfs#9677 hardened /rustfs/admin/v3/add-user to fail closed when a non-empty deprecated policy field is provided. scripts/s3-tests/run.sh was still passing policy=readwrite in the add-user body even though it immediately calls set-user-or-group-policy right after, and awscurl returned exit 0 on XML <Error> responses so provisioning silently failed and broke all alt-user s3-tests.

Remove the deprecated policy field from the add-user payload, check awscurl responses for XML <Error> elements in provisioning, and add a regression unit test in scripts/s3-tests/test_runner_tools.py.

Refs: rustfs/backlog#1246

* fix(ci): fail S3 user provisioning on HTTP errors without logging responses

* fix(iceberg): reject repeated warehouses before validating bucket names

* test(ecstore): wait for relaxed writes on the foreground lane

* test(quota): isolate concurrent real-disk probes in CI

* test(ecstore): scope upload lock identity helper to its Linux test

* ci: allow cold builds to finish all fuzz binaries
2026-11-29 09:49:55 +08:00
Ramakrishna Chilaka 312e1bc6f6 perf(crypto): encrypt and decrypt stream_io fragments in place (#9733) 2026-11-29 09:49:47 +08:00
Ramakrishna Chilaka 39065bb10c perf(signer): avoid redundant string and vector allocations in SigV4 signing (#9728) 2026-11-29 09:49:39 +08:00
Ramakrishna Chilaka 9807dd884c perf(lock): eliminate redundant allocations, clock calls, and guard unregistrations (#9720)
* perf(lock): eliminate redundant allocations, clock calls, and guard unregistrations

* fix(lock): scope GlobalLockManager fast inherent helpers to crate
2026-11-29 09:49:30 +08:00
Ramakrishna Chilaka daf7d280d7 perf(ecstore): defer destination preflight on fused non-inline commits (#9716)
* perf(ecstore): defer destination preflight on fused non-inline commits

Extend deferred destination preflight to non-inline fused rename_data commits on Linux, skip descriptor-cache part path construction and invalidation when committing inline objects, and use io_get_object_open_path for staged multipart data directories on Linux.

* fix(ecstore): gate can_defer_dst_preflight with cfg(target_os = "linux")
2026-11-29 09:49:22 +08:00
Ildar Manzhikov 85aa1bb241 fix(ecstore): settle already-applied delete markers (#9688)
* fix(ecstore): settle already-applied delete markers

* fix(ci): stop sending deprecated policy field in s3-tests add-user

rustfs/rustfs#9677 hardened /rustfs/admin/v3/add-user to fail closed when a non-empty deprecated policy field is provided. scripts/s3-tests/run.sh was still passing policy=readwrite in the add-user body even though it immediately calls set-user-or-group-policy right after, and awscurl returned exit 0 on XML <Error> responses so provisioning silently failed and broke all alt-user s3-tests.

Remove the deprecated policy field from the add-user payload, check awscurl responses for XML <Error> elements in provisioning, and add a regression unit test in scripts/s3-tests/test_runner_tools.py.

Refs: rustfs/backlog#1246

* fix(ci): fail S3 user provisioning on HTTP errors without logging responses

* fix(iceberg): reject repeated warehouses before validating bucket names

* test(ecstore): scope upload lock identity helper to its Linux test

(cherry picked from commit 72539d5991)

* ci: allow cold builds to finish all fuzz binaries

(cherry picked from commit 95e299b012)

---------

Co-authored-by: overtrue <anzhengchao@gmail.com>
2026-11-29 09:49:14 +08:00
唐小鸭 02981d3838 fix(sse): accept ARN-prefixed plain key names on SSE-KMS writes (#9679)
An SSE-KMS write whose x-amz-server-side-encryption-aws-kms-key-id header
carries a plain key name behind an AWS-style ARN prefix
(arn:aws:kms:<name>) failed with 400 KMS.NotFoundException, because the
whole header value was looked up as the key name. Bucket replication from
a source that sends key names in that form therefore left every SSE-KMS
object FAILED.

The request header is now reduced to <name> when the remainder after the
prefix is a non-empty name without ':' or '/'. Complete key and alias ARNs
keep further ':'-separated fields and are passed on unchanged. The
reduction runs on the request's own value before it is merged with a
bucket default and before the KMS authorization check, so PutObject,
CopyObject and CreateMultipartUpload authorize, seal and record one key
id. A bucket default KMSMasterKeyID is still used as configured.
2026-11-29 09:49:05 +08:00
Ramakrishna Chilaka 60766c0abf perf(sse): fast-path unencrypted metadata and static header lookups (#9729) 2026-11-29 09:48:57 +08:00
Ramakrishna Chilaka 6128dcadd4 perf(iam): avoid redundant UserIdentity clones in auth lookup and policy merge (#9727) 2026-11-29 09:48:49 +08:00
Ramakrishna Chilaka 486914b5cf perf(object-data-cache): intern null version id and precheck projected weight (#9722) 2026-11-29 09:48:40 +08:00
Ramakrishna Chilaka e1f497e1b1 perf(rio): avoid redundant checksum clones, buffer allocs, and stack zeroing (#9721) 2026-11-29 09:48:31 +08:00
Ramakrishna Chilaka b9ebd30782 perf(utils): avoid redundant hashing and allocations in metadata_compat (#9719)
Skip empty-map probes in get_str, get_consistent_value, contains_key_str, and remove_str, remove redundant pre-retain HashMap::remove calls on ASCII suffixes in remove_str, and avoid String allocations in internal_key_starts_with and both_keys.
2026-11-29 09:48:23 +08:00
Ramakrishna Chilaka 84dcdbe630 perf(filemeta): pre-size marshal buffers and MetaObject metadata maps (#9718)
Pre-size MetaObject::meta_sys and MetaObject::meta_user in From<FileInfo> for MetaObject to avoid HashMap table reallocations, and pre-size marshal_msg buffers on ObjectPartInfo, MetaObject, FileMetaVersion, and MetaDeleteMarker.
2026-11-29 09:48:14 +08:00
Ramakrishna Chilaka 21d8b0fad6 perf(ecstore): add uniform part-quorum fast path and reduce upload path allocs (#9717)
Add a uniform-quorum fast path in resolve_read_part_from_responses to avoid HashMap allocations when disks agree on part metadata, avoid intermediate String and Vec allocations in get_multipart_sha_dir and get_upload_id_dir, and use Arc<str> and in-place prepared_disks return in SetDisks::rename_part.
2026-11-29 09:48:06 +08:00
Ramakrishna Chilaka 09211806f3 perf(ecstore): scale GET metadata cache and share shuffled read metadata (#9715)
Increase DEFAULT_GET_OBJECT_METADATA_CACHE_MAX_ENTRIES to 32,768 and GET_OBJECT_METADATA_CACHE_FENCE_SHARDS to 16,384, precompute and share Arc-backed shuffled non-inline metadata on GetObjectMetadataCacheEntry across GET reader paths, and insert SUFFIX_ACTUAL_SIZE into FileInfo before cloning per-replica metadata in SetDisks::put_object.
2026-11-29 09:47:57 +08:00
Hauser Zhi 1171ac9be2 feat(ecstore): observe destination directory fsync batches (#9711)
Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
2026-11-29 09:47:48 +08:00
Ramakrishna Chilaka 4a55a3f5cc perf(ecstore): deduplicate multipart commit checks and coalesce cleanup (#9691)
Scope has_clean_active_multipart_source to individual part numbers when checking part transactions and serialize unsettled_parts updates inside the part-transaction lock and SourceRW blocking closures.

Add has_active_multipart_source_matching so SetDisks::put_object_part can reuse the pre-commit upload head metadata in the commit stage when the upload commit guard is held, no size limit applies, and all active local drives match the cached upload data_dir and mod_time.

Coalesce empty <sha256> ancestor directory pruning into the same blocking operation as the multipart upload trash rename in LocalDisk::delete, reducing recursive multipart upload cleanup from two blocking-queue jobs per drive to one.
2026-11-29 09:47:38 +08:00
Ramakrishna Chilaka b1cdac7539 perf(ecstore): deduplicate multipart metadata path resolution and stamps (#9712)
Reuse validated bucket/upload paths and pre-rename FileStamps during multipart metadata writes, add an in-memory data_dir-bound precheck in LocalDisk::read_parts before acquiring DiskIoPermit, and skip unused part cleanup vector construction in SetDisks::complete_multipart_upload when can_skip_part_cleanup is true.

Co-authored-by: Hauser Zhi <housemecn@gmail.com>
2026-11-29 09:47:29 +08:00
Hauser Zhi fdacb7ae40 perf(quota): batch v1 ledger writes under contention (#9694)
* perf(quota): reuse the v1 ledger lock during admission

Use the fenced ledger read for both the stale reservation check and
quota admission. Drop the ledger lock while probing operation owners,
then reload before applying recovery. Correlate v1 ledger acquisitions
across request and detached commit tasks.

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

* perf(quota): batch v1 commit markers and settlements

Share one fenced ledger load and durable save for pending mutations
on the same coordinator. Keep per-request acquisition budgets and
retain operation owners until persistence completes. Preserve isolated
mutation errors and the existing admission and crash boundaries.

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

* perf(quota): batch v1 admissions through the ledger executor

Apply pending admissions against one fenced balance and acknowledge
them after the shared durable save. Keep independent recovery for
abandoned operations and avoid reporting a speculative hard-cap
denial after a failed write. Share immutable reservation data across
detached stages without copying object and ledger keys.

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

* test(heal): wait for restored root completion handoff

Use the scheduler's test hook to wait for the terminal publication
attempt and active-task removal without polling against a five-second
wall-clock deadline. Verify the successful terminal receipt on disk
and that no pending recovery remains.

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 09:47:21 +08:00
GatewayJ 2c46461ff9 fix(oidc): allow operator-configured outbound proxies in egress policy (#9709)
Separate operator-configured HTTP(S) forward-proxy resolution from direct target DNS filtering in `rustfs_utils::egress` and wire OIDC HTTP clients through `OutboundPolicy::configure_reqwest_client`. Target OIDC URLs are always validated up front, direct and `NO_PROXY`/loopback connections retain connection-time target DNS filtering, and matched `HTTP_PROXY`/`HTTPS_PROXY`/`ALL_PROXY` hops permit private, shared, and loopback proxy addresses while keeping metadata, link-local, unspecified, translation, and reserved addresses (plus SOCKS schemes) blocked fail-closed. `OutboundPolicyError` preserves its exact target-policy shape alongside orthogonal `OutboundClientError`, and proxy rejections identify the proxy configuration without emitting misleading `RUSTFS_OUTBOUND_ALLOW_ORIGINS` hints for the OIDC provider origin.

Fixes #9611
2026-11-29 09:47:13 +08:00
Hauser Zhi 70c48de27b perf(ecstore): reuse unfenced multipart disk state (#9708)
Move the shuffled disk vector into completion and avoid creating an
unused token table when the quota mutation fence is inactive.

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
2026-11-29 09:47:04 +08:00
Hauser Zhi b5d197dd44 perf(ecstore): join synchronous unary rename outcomes directly (#9702)
Collect direct unary results from the detached JoinSet. Preserve
streamed delivery for batch, early ACK, and publication-scoped
operations, with the existing rollback and deadline handling.

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
Co-authored-by: overtrue <anzhengchao@gmail.com>
2026-11-29 09:46:56 +08:00
Hauser Zhi 16b449c61d feat(obs): trace slow synchronous rename slots (#9697)
Report the phase split and configured disk coordinates for a slow
direct unary slot. Reuse an available request trace ID across the
detached PUT commit without changing RPC metadata.

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
2026-11-29 09:35:00 +08:00
Hauser Zhi b5e69531dc feat(ecstore): opt in to higher parity for degraded PUTs (#9692)
* feat(ecstore): opt in to higher parity for degraded PUTs

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

* fix(ecstore): count recovering drives in degraded PUT parity

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

* test(storage): exercise recovery and late quorum loss

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

* test(e2e): bound startup during degraded parity checks

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

* perf(ecstore): streamline degraded PUT and writer setup

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

* perf(ecstore): avoid redundant PUT staging work

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 09:34:50 +08:00
Hauser Zhi de1aa2429c perf(ecstore): avoid redundant rename commit allocations (#9698)
Skip allocating empty scanner fence tables. Borrow the online disk
list for fully joined capacity accounting and borrow UTF-8 views for
local rename path validation.

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
2026-11-29 09:34:38 +08:00
Hauser Zhi f92a493d37 perf(ecstore): skip unused quota fence state on ordinary PUT (#9704)
Avoid an all-empty token table and gate tail release captures on an
active quota mutation fence. Preserve the existing fence finalizer
and cancellation handling.

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
2026-11-29 09:34:19 +08:00
Hauser Zhi 038af7dcaa perf(ecstore): reuse the synchronous rename disk snapshot (#9701)
Reuse the fanout disk vector after all producers join and write
quorum succeeds. Keep reuse ownership with the caller and drop it
before entering asynchronous rollback or recovery.

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
Co-authored-by: qunjiazhu <qunjiazhu@gmail.com>
2026-11-28 15:26:25 +00:00
Hauser Zhi 7eb34f2078 fix(iceberg): report duplicate warehouse parameters consistently (#9703)
Extract the warehouse validation fix from 5b32426529 and assert the exact error for repeated query parameters.

Co-authored-by: overtrue <anzhengchao@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-28 15:08:42 +00:00
唐小鸭 3a7ceb350f fix(heal): converge past superseded overwrite backups (#9681)
An overwrite interrupted after publishing its metadata leaves the
replaced generation's backup, and its data directory, behind a live
successor. Delete recovery classified that residue as an ambiguous legacy
delete, so object heal failed before shard reconstruction on every retry
and the object stayed under-replicated.

A drive now reports a journal-less backup whose versions are all still
live, with the differing one replaced in place by a strictly newer
unversioned object. The report alone resolves nothing. Heal proceeds past
such residue only when the newest generation reached write quorum, and
discards the backups only once every drive holds identical live
metadata. The replaced parts are then reclaimed as plain orphan data
directories. Residue with delete evidence, versioned, tiered or
object-locked successors, and an uncommitted successor stay blocked.

Co-authored-by: hector <42570491+majinghe@users.noreply.github.com>
2026-11-28 13:54:16 +00:00
Chris An 97d30eaccf test(security): add fuzzing, rejection mutants, and obs fault tests (#9699)
* test(security): add fuzzing, rejection mutants, and obs fault tests

Add sigv4_request and notify_xml libFuzzer targets with seed corpora and
unit tests, wire fuzz.yml as a workflow_call security-input-gate in CI
with trusted changed-path selection, and add fixed rejection-branch
mutation verification in isolated workspaces.

Verify #[path] coverage attribution with canonical path merging in
coverage_per_crate.py, sanitize OTLP startup endpoint logging, and add
connect_logs lease/fault regressions, local fake-OTLP 401/500/refused/
timeout/redaction tests, and E2E observability export failure isolation
tests.

Refs: rustfs/backlog#2677, rustfs/backlog#2679

* fix(ci): stop sending deprecated policy field in s3-tests add-user

rustfs/rustfs#9677 hardened /rustfs/admin/v3/add-user to fail closed when a non-empty deprecated policy field is provided. scripts/s3-tests/run.sh was still passing policy=readwrite in the add-user body even though it immediately calls set-user-or-group-policy right after, and awscurl returned exit 0 on XML <Error> responses so provisioning silently failed and broke all alt-user s3-tests.

Remove the deprecated policy field from the add-user payload, check awscurl responses for XML <Error> elements in provisioning, and add a regression unit test in scripts/s3-tests/test_runner_tools.py.

Refs: rustfs/backlog#1246

* fix(ci): run called validation gates and count wrapped coverage lines

* fix(ci): fail S3 user provisioning on HTTP errors without logging responses

* fix(iceberg): reject repeated warehouses before validating bucket names

* test(ecstore): wait for relaxed writes on the foreground lane

* test(quota): isolate concurrent real-disk probes in CI

* ci: budget for cold instrumentation builds and validation rebuilds

* test(ecstore): scope upload lock identity helper to its Linux test

* test(ecstore): isolate namespace lock checks from runner disk latency

* test(ecstore): wait for inline source publication before reading a disk

* test(connect): isolate the durable receipt integration test
2026-11-28 13:47:56 +00:00
祈雨 bc990465e2 perf(policy): bound wildcard matching on adversarial inputs (#9486)
Co-authored-by: Kuromi <kuromiqiyu@gmail.com>
Co-authored-by: GatewayJ <835269233@qq.com>
Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
2026-11-28 13:27:28 +00:00
Peter van Mourik bbf422e1ee fix(ecstore): remove staged heal data when the heal is dropped (#9591)
* fix(ecstore): remove staged heal data when the heal is dropped

A heal task that reaches its timeout, or is cancelled, has its storage heal future dropped in the middle of the data stage. The shards it had staged under its tmp prefix were only removed on the heal's own return paths, so a dropped heal left them on the outdated disks until the stale-tmp sweep a day later.

Add a guard that removes the staged prefix when the heal future is dropped during the data stage. It is disarmed once the heal has cleaned up itself and before the rename phase, so it never removes a prefix that is being renamed into place.

* test(ecstore): prove staged heal cleanup stops before the rename phase

Add a regression test for the disarm that precedes the rename phase: pause the physical rename of the first target, drop the heal future, and check that no staged-prefix removal was dispatched and that the detached rename still publishes a complete target. A test-only counter in the guard's Drop makes the dispatch observable.

The two tests share one fixture, and the staging test now also asserts exactly one dispatch.

* test(ecstore): gate heal rename test off Windows, observe publication

The rename test imports `prepared_publication_test_hooks`, which `disk/os.rs` compiles out on Windows, so the ecstore unit-test binary did not build there. Gate the test to the platforms that provide the hook, as the other users of the hook are.

The fixture removed the targets' shard directory and left their metadata head pointing at the data directory, so the wait for the detached rename was already satisfied before the rename ran. Start both targets without a metadata head, assert the paused target still has none while its rename is held, and wait for the head to appear before checking the data directory it names.

---------

Co-authored-by: Hauser Zhi <housemecn@gmail.com>
Co-authored-by: Chris An <anzhengchao@gmail.com>
2026-11-28 03:35:42 +00:00