Aa processor clarify#223
Draft
jacomago wants to merge 11 commits into
Draft
Conversation
b0f4eb3 to
3feb24a
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Eliminate three duplicate inline stream-filter-findFirst patterns for channel property lookups. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace a 15-line Optional.map(→Stream).orElse(stream) chain with a named helper method, making the intent immediately clear at the call site. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
process() was doing three things: guard clauses, mapping channels to per-archiver PV options, and submitting actions. Extract the latter two into named methods so process() reads as a three-step narrative. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the imperative for-loop (with continue guard) with a stream pipeline. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion - INFO: "Processing N channels." / "Configured N channels." frame each run - WARNING (new): "No reachable archivers configured" when archiversInfo is empty - WARNING: per-channel failure now names the channel and archiver alias - WARNING: archiver response anomalies now identify which archiver and what was wrong - FINE (was INFO): per-archiver status query — too chatty for production INFO - FINER: raw status response now includes archiver alias for correlation - All String.format calls wrapped in lambdas for lazy evaluation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…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 (package-private; promoted in next commit). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… transport methods ArchiverService was holding archiver-alias config (postSupportArchivers) and making the POST-vs-GET routing decision — a concern that belongs in AAChannelProcessor alongside all other per-archiver configuration. ArchiverService now exposes two public transport methods: getStatusesViaGet(url, pvs) — batches internally (URL length limit) getStatusesViaPost(url, pvs) — sends in a single POST body AAChannelProcessor holds @value("${aa.post_support:}") and selects the correct transport in getArchiveActions(). The field is volatile so the runtime setter added later is thread-safe. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ot PV map Logging the full PV map at INFO generates enormous output in production. Replace with a count summary at FINE. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3feb24a to
f6be0e5
Compare
Policies are fetched once at startup (@PostConstruct) and refreshed on a configurable fixed delay (aa.policy_refresh_interval_seconds, default 1 h) rather than on every process() call. process() now reads a volatile snapshot, so policy fetches can no longer block or fail mid-run. processorInfo() exposes LastPolicyRefresh and per-archiver policy counts for observability. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
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.



No description provided.