Fix manifest store hang: range-chunk flat shard buckets, parallel shard stores #37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/manifest-shard-explosion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Manifest store hang: range-chunk flat shard buckets, parallel shard stores
Problem
jd syncon a 172K-file tree (15GiB) finished all uploads, then spun in"checkpointing manifest" for 20+ hours with zero progress, zero log output
even under
-d, and 100% CPU/persistent network activity.Root cause
manifest-expand-shard-groupsplit oversized buckets by descending one morepath component without checking whether that component is the filename
itself. Any flat directory with more files than the entry limit (old
default 4096) exploded into one shard per file:
(largest 808 entries)
store-manifest-shards!with no logging, so the final manifest storewas ~50K silent uploads — hours of work misread as a hang
Fix
manifest-expand-shard-groupstops descending when no entry has a deeperpath component, and range-chunks the oversized group into deterministic
"<group-id>#k"ranges of the entry limit (sorted by path, stable ids)manifest-shard-assignmentemits groups in ascending shard-id orderstore-manifest-shards!stores shards on the parallel worker pool(
manifest-shard-fetch-width, 8) and logs the assignment plus eachstored/unchanged shard under
-dJDRIVE_MANIFEST_SHARD_ENTRIES4096 -> 8192, matching thedocumented default; user guide documents the range-chunking
Verification
assignment in 0.4s
splitting of oversized buckets
make testgreen (live S3 test skipped)Upgrade note
Drives stored by an affected run (if any mid-run root landed) self-heal: the
next successful store writes the new assignment and
gc-manifest-shards!deletes the old per-file shards. Shards are content-addressed, so unchanged
shards from this fix still skip upload.
162c97a2738b1dcac3f18b1dcac3f1b5a5ff044b