Batch Transfer 1.0.1-RC — parallel Clone/Reimport, query hardening, UI fixes#7
Merged
Merged
Conversation
… select - Reimport: suppress session expand arrows whose only children (image assessors) are out of scope, via a `bt-reimport-mode` body flag + CSS. Share/Clone unaffected. - Re-query destination anon status on each selection (checkProjectAnon forceRefresh) instead of reading a page-load snapshot; drop the up-front bulk pre-fetch.
…OM strings. Prepared CHANGELOG, ROADMAP and version for PR.
ransfordj
approved these changes
Jun 23, 2026
|
I don't think you want to allow modifying JMS queue settings live / without tomcat restart (https://radiologics.atlassian.net/browse/CS-1037). Edit: I see now that you require a tomcat restart, nevermind this concern! |
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.
Summary
Moves Reimport and Clone off the single sequential loop onto JMS queues so a batch
processes concurrently, hardens the listing query against SQL injection, unifies
workflow-history messages across all three operations, and fixes two UI issues.
Consumer concurrency is admin-tunable, with defaults chosen from profiling (below).
No breaking changes to the
/xapi/transferrequest format — the new queue-settingsendpoint is additive. Targets XNAT 1.9.3.3 / JDK 8.
Major changes
Parallel processing via JMS queues (#6 )
(
vm://) JMS queues, replacing the single sequentialbatchTransferloop.BatchTransferMonitorfans results back in and emits exactly oneterminal Transfer Complete / Warning event per batch, once every item across every
operation has finished.
GET/POST /xapi/batch_transfer/jms_queues. Defaults Reimport 4–8, Clone 1–2;set
min = max = 1for a serial kill-switch.Operation-aware batch routing
each group routed to its correct path (Reimport queue, Clone queue, or in-process
sequential for Share). Previously the batch assumed a single operation type.
Clone file-copy optimization
only catalog/XML files are read and the rest are hard-linked directly — sharply fewer
syscalls on large multi-scan sessions.
Unified workflow history
label for all three operations: "Cloned / Shared / Reimported
<item>to project<dest>".per cloned item). Clone provenance is retained via the source workflow + the preserved
original-projectfield; rollback-on-failure is unchanged.Security — parameterized listing query (#5 )
(
:userId,:project,:ids) viaNamedParameterJdbcTemplate. Request-derived filtervalues are now bound parameters instead of being concatenated into the query string
(SQL-injection hardening of the project/id filters).
UI fixes
image assessors no longer shows a dead expand arrow in Reimport mode.
selection change instead of read once at page load, so the About this transfer banner
reflects the project actually selected.
Profiler analysis (Java Flight Recorder)
Profiling drove the conservative concurrency defaults and confirmed where time actually goes.
Clone is filesystem/metadata-bound. ~99% of clone time is filesystem work — hard-linking
(
Files.createLink) and directory walks. The catalog-read optimization above removed a largeblock of needless file opens; what remains is irreducible link + walk syscalls. More
parallelism does little, because the cost is shared-storage I/O, not CPU.
Reimport is bound by prearchive storage I/O and the anonymization pipeline (DICOM parse +
DicomEdit/mizer) — not CPU, and not plugin-level locking.
Conclusions baked into this PR:
with a
min = max = 1serial kill-switch.bind-mounted storage, keep concurrency at 1; raise it only on fast local/SAN storage. Captured
in
docs/ROADMAP.mdunder Performance & scaling.Configuration & deployment notes
/xapi/batch_transfer/jms_queues.