Repository navigation
Upload: bound git-annex add workers and feed paths through --batch - #1649
Closed
bruAristimunha wants to merge 1 commit into
Closed
bruAristimunha wants to merge 1 commit into
bruAristimunha wants to merge 1 commit into
Conversation
The tracking step ran 'git annex add -- <500 paths>' per chunk with no worker count, so a machine-wide annex.jobs decided how many hashers hit the filesystem, and on network filesystems the argv form stalled in filter-process (nemarOrg#1455: NFS evidence; nm000359: ~34 files/min on Ceph). - gitAnnexAdd always passes an explicit -J (default 4, clamped 1..32). - A path list is fed through 'git annex add --batch -z --json' on stdin, still chunked so every finished chunk persists for resume; per-file failures are parsed from the JSON records, and a missing path still fails loudly (checked per chunk). - New 'nemar dataset upload --annex-jobs <n>' keeps local hashing separate from -j (S3 streams); the plan and the tracking spinner show both.
9 tasks done
neuromechanist
changed the base branch from
dev
to
feature/issue-1671-epic-bru-upload-fixes
October 7, 2026 22:06
neuromechanist
added a commit
that referenced
this pull request
Oct 9, 2026
Adapted from Bru's PR #1649 onto epic #1671. Adds bounded NUL-fed batch transport for path-list annex adds and treats unanswered missing paths and filesystem errors correctly while preserving staged-blob recovery. Keep issue #1455 open: the local worker-count default, controlled benchmark, and inactivity diagnostic remain unresolved.EOF
This was referenced Oct 9, 2026
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#1455: the tracking step runs
git annex add -- <500 paths>per chunk with no worker count (src/lib/git-annex/init.ts, call sitesrc/lib/upload/transfer.ts), so a machine-wideannex.jobsdecides how many hashers hit the filesystem, and on network filesystems the argv form stalls infilter-process(the NFS evidence in #1455). On nm000359 (Ceph) tracking ran at about 34 files/min.Change
gitAnnexAddalways passes an explicit-J(default 4, clamped 1..32), also for the whole-tree"."callers.git annex add --batch -z --json --json-error-messageson stdin, still in 500-path chunks so each finished chunk persists for resume. Per-file failures are parsed from the JSON. A missing path still fails loudly (checked per chunk, which keeps the existing mid-chunk-failure semantics).nemar dataset upload --annex-jobs <n>, separate from-j(S3 streams). The plan and the tracking spinner show both.Behavior to know about
Ceph benchmark (8 CPU node, git 2.53, git-annex 10.20260717, fresh adjusted/unlocked repo, 600 × 120 KB
.edf+ 600 JSON): 534 s before (67 files/min), 462 s with--batch -z -J4(78 files/min), about 14 %. On Ceph, many small files are bound by per-file metadata and sync work, not hashing, so this is not a step change; the main value is the one #1455 documents (no argvfilter-processstall, explicit worker count).Not done here: the inactivity diagnostic #1455 also asks for. The save-step half of #1455 is in #1647.
Part of #1455
Testing
test/annex-add-batch-jobs.unit.test.ts(new, 7 tests): default and clamping; JSON failure parsing; and with real git-annex,--batchwith an explicit-Jacross chunks (asserted throughGIT_TRACE, withannex.jobs=cpusset and overridden), a missing path fails loudly, re-adding annexed unchanged files is a quiet success (resume),forceLarge/checkGitignorestill apply.The existing add/resume/chunk tests are unchanged. 16 files that import the changed modules: 250 pass, 1 skip, 0 fail (on current
dev).bun run typecheck,biome checkon the changed files.CI
api-testandintegration-devfail on this PR because it comes from a fork: both call the dev API with theTEST_*_API_KEYsecrets, which GitHub does not pass to fork pull requests, so the authenticated cases fail and the unauthenticated ones pass.lint,unit-pureande2e-sandboxrun normally.