Skip to content

refactor(concurrent_delete): rename module + types to reflect N concurrent single-DELETE - #573

Merged
ldflags merged 1 commit into
mainfrom
refactor/issue-572-rename-batched-delete
Aug 14, 2026
Merged

refactor(concurrent_delete): rename module + types to reflect N concurrent single-DELETE#573
ldflags merged 1 commit into
mainfrom
refactor/issue-572-rename-batched-delete

Conversation

@ldflags

@ldflags ldflags commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Closes #572.

Follow-up to issue #568 stage 6 (PR #569) and #570 (PR #571). Issue #568 stage 6 replaced the batch-XML DeleteObjects default path with rclone-style N concurrent single-DELETE workers. The module file src/batched_delete.rs and its types still carried the "batch" name from the retired implementation — there is no batching left, just an N-worker pool firing per-key DELETEs. This PR retitles everything to reflect the surviving design.

Identifier renames

Old New
src/batched_delete.rs src/concurrent_delete.rs
struct BatchedDeleter ConcurrentDeleter
module batched_delete concurrent_delete
WorkerConfig::batched_delete_config WorkerConfig::concurrent_delete_config
MntrsFs::batched_deleter MntrsFs::concurrent_deleter
tracing target mntrs::batched_delete mntrs::concurrent_delete
log prefix "batched_delete: ..." "concurrent_delete: ..."
error prefix "batched_delete error: ..." "concurrent_delete error: ..."

Constants

  • DEFAULT_BATCH_THRESHOLD removed from src/concurrent_delete.rs.
  • Two new consts added at the top of src/lib.rs (above UnlinkBurstState):
    • DEFAULT_UNLINK_BURST_WINDOW_MS: u64 = 100
    • pub(crate) DEFAULT_UNLINK_BURST_THRESHOLD: u32 = 32
  • UnlinkBurstState::from_env now reads these two consts instead of the old batched_delete::DEFAULT_BATCH_THRESHOLD reference.

Scripts / bench

  • bench/unlink_ab.sh — strip dead MNTRS_BATCH_FLUSH_DELAY_MS=10 export; retarget tracing target; rewrite the batch-XML metrics block (counts batch_size=N / multi-key lines) to count single-key DELETE / retry / fail events from the N concurrent single-DELETE worker pool.
  • scripts/micro_bench_rm.sh — header comment updated to "S3 deleter paths"; strip dead MNTRS_BATCH_FLUSH_DELAY_MS=10, MNTRS_BATCH_THRESHOLD=0, MNTRS_BATCH_SIZE=20, MNTRS_BATCH_FAST_FLUSH_THRESHOLD=8 exports; retarget tracing target; drop the now-obsolete 3-mode comparison block ("batched+fast-flush" mode is gone).
  • bench/run_all.sh — rewrite the knob doc block from the retired four-knob shape (MNTRS_BATCH_FLUSH_DELAY_MS / MNTRS_BATCH_THRESHOLD / MNTRS_BATCH_SIZE / MNTRS_BATCH_FAST_FLUSH_THRESHOLD / MNTRS_BATCH_PROFILE) to the surviving two knobs (MNTRS_BURST_WINDOW_MS=200, MNTRS_BURST_THRESHOLD=4); strip the dead env exports from the mount command; retarget tracing target.

Out of scope (preserved as-is)

Verification

  • cargo fmt --all -- --check — green
  • cargo clippy --workspace --all-targets -- -D warnings — green
  • cargo build (debug) — green
  • cargo test --workspace --lib — 281 passed, 0 failed
  • bash -n bench/run_all.sh bench/unlink_ab.sh scripts/micro_bench_rm.sh — green
  • git grep -E "batched_delete|BatchedDeleter|batched_deleter" in src/, bench/, scripts/ — 0 hits in active code; remaining matches are historical doc-comments and the standalone delete_batch_poc.sh PoC (out of scope).

…rrent single-DELETE

Issue #572 — follow-up to issue #568 stage 6 + #570.

Issue #568 stage 6 (PR #569) replaced the batch-XML DeleteObjects
default path with rclone-style N concurrent single-DELETE workers.
The module file `src/batched_delete.rs` and its types still carried
the "batch" name from the retired implementation, which now read as
misleading — there is no batching left, just an N-worker pool firing
per-key DELETEs.

This commit retitles everything to reflect the surviving design:

  src/batched_delete.rs          -> src/concurrent_delete.rs
  struct BatchedDeleter          -> ConcurrentDeleter
  module batched_delete          -> concurrent_delete
  WorkerConfig field
    batched_delete_config        -> concurrent_delete_config
  MntrsFs field
    batched_deleter              -> concurrent_deleter
  tracing target
    mntrs::batched_delete        -> mntrs::concurrent_delete
  prefix used in log strings
    "batched_delete: …"          -> "concurrent_delete: …"
  prefix used in error strings
    "batched_delete error: …"    -> "concurrent_delete error: …"

Constants in src/concurrent_delete.rs:
  DEFAULT_BATCH_THRESHOLD        -> removed (moved to lib.rs)

Constants in src/lib.rs (above UnlinkBurstState):
  + DEFAULT_UNLINK_BURST_WINDOW_MS: u64 = 100
  + DEFAULT_UNLINK_BURST_THRESHOLD: u32 = 32 (pub(crate))

UnlinkBurstState::from_env now reads the two new consts instead of
the old `batched_delete::DEFAULT_BATCH_THRESHOLD` reference. Field
doc comments on UnlinkBurstState (window_ms / threshold) and the
burst-detector trace inside op.unlink are rewritten to drop the
stale "batched_delete::DEFAULT_BATCH_THRESHOLD" noun.

src/cmd/mount.rs:
  - tracing::info! payload retargeted to `mntrs::concurrent_delete`
  - tracing target string updated
  - delete_mode = "concurrent-single" already aligned in PR #569

Scripts and bench (no behavioral change to default policy):
  bench/unlink_ab.sh
    - strip dead MNTRS_BATCH_FLUSH_DELAY_MS=10 export
    - retarget tracing target to mntrs::concurrent_delete
    - rewrite the batch-XML metrics block (batch_size=N / multi-key
      lines) to count single-key DELETE / retry / fail events from
      the N concurrent single-DELETE worker pool

  scripts/micro_bench_rm.sh
    - header comment now reads "S3 deleter paths" (was "issue 541
      fast-flush threshold verification")
    - strip dead MNTRS_BATCH_FLUSH_DELAY_MS=10,
      MNTRS_BATCH_THRESHOLD=0, MNTRS_BATCH_SIZE=20,
      MNTRS_BATCH_FAST_FLUSH_THRESHOLD=8 exports
    - retarget tracing target to mntrs::concurrent_delete
    - drop the now-obsolete 3-mode comparison block
      ("batched+fast-flush" mode is gone)

  bench/run_all.sh
    - rewrite knob doc block from the retired four-knob shape
      (MNTRS_BATCH_FLUSH_DELAY_MS / MNTRS_BATCH_THRESHOLD /
      MNTRS_BATCH_SIZE / MNTRS_BATCH_FAST_FLUSH_THRESHOLD /
      MNTRS_BATCH_PROFILE) to the surviving two knobs
      (MNTRS_BURST_WINDOW_MS=200, MNTRS_BURST_THRESHOLD=4)
    - strip the dead env exports from the mount command
    - retarget tracing target to mntrs::concurrent_delete

Out of scope (preserved as-is):
  - MNTRS_BATCH_MNT / MNTRS_BATCH_DAEMON_LOG shell vars: mount path
    and log path, not runtime knobs
  - delete_mode = "concurrent-single" literal: already aligned in PR #569
  - bench/delete_batch_poc.sh: standalone PoC for the retired
    DeleteObjects XML path, not invoked from the bench flow

Historical references to "batched_delete" in explanatory comments
(Issue #562 stage 0 workload rationale, the "Removed 2026-08-03"
mkdir-deep test record, the dead-knobs archive comment in
src/concurrent_delete.rs) are preserved verbatim — they document
the design history that this rename is a follow-up to.

Verification:
  cargo fmt --all -- --check                        green
  cargo clippy --workspace --all-targets -- -D warnings   green
  cargo build                                       green
  cargo test --workspace --lib                      281 passed, 0 failed
  bash -n bench/run_all.sh bench/unlink_ab.sh scripts/micro_bench_rm.sh   green
  git grep -E "batched_delete|BatchedDeleter|batched_deleter" in src/, bench/, scripts/
    -> 0 hits in active code; remaining matches are historical
       doc-comments and the standalone delete_batch_poc.sh PoC
       (out of scope).

Closes #572.

Co-Authored-By: Claude <noreply@anthropic.com>
@ldflags
ldflags merged commit c11466f into main Aug 14, 2026
24 checks passed
dyrnq added a commit that referenced this pull request Aug 14, 2026
PR #575 advanced Cargo.lock to reqsign-aws-v4 3.2.0, reqsign-core
3.3.0, reqsign-file-read-tokio 3.0.5 (plus a new transitive
reqsign-aws-core 3.1.0 extracted from aws-v4 3.2). Cargo.toml
manifest pins are still at the old 3.0/3.2/3.0 values — this PR
brings them in line so a future `cargo update` doesn't have to
climb across minor versions.

The plan #64 comment is rewritten to point at the new module
name (`concurrent_delete` after #573) and the new pin-policy
("track reqsign 3.x line" rather than "mirror opendal's transitive
version"), since we are now deliberately ahead of opendal-service-s3
0.58.1's transitives by 2 minor versions.

Verified:
- cargo check --workspace clean
- cargo clippy --all-targets -- -D warnings clean
- cargo build --workspace clean (was verified in PR #575)
- Cargo.lock unchanged from PR #575 head

Refs: #574
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(batched_delete): rename module + types to reflect N concurrent single-DELETE

1 participant