Aa Processor fixes#225
Conversation
jacomago
commented
May 27, 2026
- Add a connection timeout
- Skip archivers that are not available
- log a warning when pvs are not resumed
…urious ARCHIVE Previously, a failed HTTP status batch silently returned an empty list. Those PVs were then treated as "not archived" and submitted for archiving on every subsequent run, spamming the archiver with duplicate requests. ArchiverService now throws ArchiverServiceException on status fetch failure. AAChannelProcessor catches it in getArchiveActions() and returns null, causing submitToArchivers() to skip that archiver entirely for the run. Also renames getStatusesFromPvListQuery/Body → getStatusesViaGet/Post to reflect their transport semantics Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Can you please fix the 3 new sonar issues? |
…fail fast Without a connect timeout, TCP SYN drops (firewall, no route) stall for the OS default (~2 min) before returning. Setting connect timeout equal to the configured read timeout ensures both slow and unreachable archivers fail at the same bounded deadline. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
done |
anderslindho
left a comment
There was a problem hiding this comment.
Only thing I didn't like was the log of failed fetch N channels. But claude found more issues that I want you to look into:
- Null guard returns wrong Optional (AAChannelProcessor:271) — The archiverInfo == null check inside getArchiveActions returns Optional.of(Map.of()) (non-empty) instead of Optional.empty(). Currently
dead code due to the outer guard in submitToArchivers, but if that guard is removed, the caller proceeds to archiverInfo.url() and NPEs silently instead of triggering the skip/warn path. - Connect-timeout has no test (ArchiverServiceTest:374) — The new test accepts the TCP connection before hanging, so it exercises setReadTimeout, not setConnectTimeout. Deleting the new
setConnectTimeout(...) line from production would leave all tests green. - Double WARNING per failure (AAChannelProcessor:302) — A single ArchiverServiceException produces two separate Level.WARNING log entries (the getArchiveActions catch + warnSkippedActivePvs). Alerting
systems counting by severity will double-fire. - Misleading "RESUME was not sent" for non-paused PVs (AAChannelProcessor:292) — The warning includes all Active PVs, not just the ones that were paused; first-time-archive PVs get a misleading
"remain paused" message. - Deprecated setConnectTimeout(int) (ArchiverService:67) — PR adds a second call using the deprecated int form instead of fixing both to Duration.ofSeconds(timeoutSeconds).
Makes clearer the response, and avoids jumping into the empty map
…outs Point the connect-timeout test at TEST-NET-1 (192.0.2.1) so the SYN is dropped and the connect timeout actually fires, rather than a closed local port that returns connection-refused instantly. Give the connect and read timeouts distinct values so each test's elapsed time proves which timeout fired. Add aa.connect_timeout_seconds (default 5s) for fail-fast on unreachable archivers; aa.timeout_seconds remains the read timeout, unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixed
Added a test and made connection timeout separate, but not sure about the test since it uses a test IP which looks flaky. Will see if passes in CI.
Dropped that commit.
In commit that's dropped.
I don't know why it thinks its deprecated: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/client/SimpleClientHttpRequestFactory.html |
|
Please fix introduced sonar issue 🙃 |
|


