Fix TransferLifeCycle SciTag boundary and FQAN fallback mapping#8039
Conversation
| return trimmed; | ||
| } | ||
|
|
||
| // If both headers are present, SciTag takes precedence. |
There was a problem hiding this comment.
Think this comment here on this line will be confusing (as we never get here if scitag is present). Suggest:
comment just afert line
String scitag = request.getHeader(HEADER_SCITAG)
somethig like
// if defined SciTag is always returned (or takes precedence)
I possible impovement (to avoi repetition) would be:
private static final String[] SCITAG_HEADERS = { “SciTag”, “TransferHeaderSciTag};
...
private String readTransferTag(HttpServletRequest request) {
for (String header: SCITAG_HEADERS) {
String tag = request.getHeader(header);
if (tag != null && !tag.isBlank()) {
String trimmed = tag.trim();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(“{} header found: {} (from client={})",
header, trimmed, request.getRemoteAddr());
}
return trimmed;
}
}
modules/dcache/src/main/java/org/dcache/pool/movers/TransferLifeCycle.java
Outdated
Show resolved
Hide resolved
modules/dcache/src/main/java/org/dcache/pool/movers/TransferLifeCycle.java
Outdated
Show resolved
Hide resolved
|
Hi @ShawnMcKee. Thanks for the contribution. Please sigh your commits with the |
Signed-off-by: Shawn McKee <smckee@umich.edu>
Signed-off-by: Shawn McKee <smckee@umich.edu>
Signed-off-by: Shawn McKee <smckee@umich.edu>
7e70343 to
df11a53
Compare
ShawnMcKee
left a comment
There was a problem hiding this comment.
Thanks for the detailed review. I have addressed the requested updates:
- Refactored SciTag parsing to reduce repetition and made precedence explicit (SciTag is checked first).
- Replaced transfer-tag magic numbers with named constants.
- Updated fallback VO extraction to use Splitter-based parsing.
- Added Signed-off-by to all commits to satisfy contributor requirements (history was rewritten and force-pushed).
The sync check is now passing.
Please take another look when you have a moment.
|
|
||
| return voToExpId.containsKey(vo.getGroup().toLowerCase()) | ||
| ? OptionalInt.of(voToExpId.get(vo.getGroup().toLowerCase())) | ||
| String groupPath = vo.getGroup().toLowerCase(); |
There was a problem hiding this comment.
may be something along these lines:
String groupPath = vo.getGroup();
if (groupPath == null || groupPath.isBlank()) {
return OptionalInt.empty();
}
groupPath = groupPath.toLowerCase();
String voName = FQAN_GROUP_SPLITTER.splitToList(groupPath).get(0);
to avoid too much fussing with checking arrays. It is my understanding that
FQAN_GROUP_SPLITTER.splitToList(groupPath).get(0)
will never fail as long as there is non-empty string as input.
also, just curious, what is the significance of lowering the case? These strings are not supposed to be ever capitalized? (IOW there is RFC for that?)
There was a problem hiding this comment.
Hi Dmitry, We lower-cased the strings to fix some issues we had early on with some implementations using capital letters. We don't really have use for mixed-case values. I am happy to change as you noted. It is a bit more logical in how it is processed. Thanks,
Shawn
Signed-off-by: Shawn McKee <smckee@umich.edu>
df11a53 to
1a16d61
Compare
|
OK, our target for this functionality would be 11.2.2 if possible. Also I am working on another PR, also targeting 11.2.2. The problem is that fireflies, when enabled, are intended to be sent to the same destination as the flow they are identifying. This allows any network along the path to discover the data flow owner and purpose. For ease of accounting we also want to support sending an optional firefly to a regional or global collector. This is not yet implemented in 11.2 but I will make a PR to do so. |
|
Looks good to me. Shall I merge? |
…-fqan-fallback Fix TransferLifeCycle SciTag boundary and FQAN fallback mapping
Merge pull request #8039 from ShawnMcKee/fix/firefly-sci-tag-boundary…
Summary
This PR fixes three firefly marker eligibility issues in TransferLifeCycle.
Code Changes
Tests
Executed:
Result:
UMFS19 Runtime Verification
Verified on deployed 11.2.1 RPM runtime after replacing dcache-core jar and restarting pool domains:
Applied full excludes configuration:
Installed-runtime matrix check:
Live capture verification (udp dst port 10514, 3 minutes):
This confirms markers are still emitted for transfers involving non-excluded networks while suppressing excluded-to-excluded transfers.
Operational Impact