Skip to main content

Module bulk

Module bulk 

Source
Expand description

Prefix bulk ops + diagnostics (copy-prefix / delete-prefix / digest / diff / inspect). Prefix bulk ops + diagnostics: copy-prefix / delete-prefix (token-bucket rate limit, --dry-run), digest, diff, inspect.

Structs§

RateLimiter
Token bucket: rate ops/second, starting EMPTY (strict pacing — a full-bucket start lets a small job burn its whole burst unthrottled, defeating the point of --rate for short sweeps). rate == 0 = unlimited.

Functions§

run_copy_prefix
copy-prefix: SCAN src prefix, re-key under dst prefix via read+rebuild frames (the server has no COPY verb; TTL carried as absolute PEXPIREAT). Rate-limited per source key.
run_delete_prefix
delete-prefix: SCAN + UNLINK, rate-limited. Returns deleted count.
run_diff
diff: compare prefixes across two servers. Returns mismatching prefixes.
run_digest
digest <prefix> → (count, hex).
run_inspect
inspect <prefix>: sample keys, type distribution, sizes.