Host adapter cache
- Trace adapter-chain lookups and compare refresh-in-place with validated replacement of an entire cache generation.
Diagram phase
Select a component to trace its direct connections. Drag to pan · Ctrl + wheel or pinch to zoom.
- An adapter chain is an ordered list of checks selected by channel, service and category. The Oracle configuration feeds a separate in-memory lookup on each serving member.
- A request arriving between clearing and refilling a chain can see an empty mapping. That matters most when the missing adapter enforces a required check.
- A generation is one complete version of all policy mappings on a member. The builder validates a candidate before replacing the active reference.
- If version 8 is required and only version 7 is available, the proposed policy can hold that route while unrelated routes with valid mappings keep serving.
Reading
- The lookup key joins channel, executing service and category. Multiple adapters under that key execute in sequence.
- A timer reloads the classloader-local map. A reload can race with a request even when individual map operations are synchronized by the writer.
- One reference swap removes the gap between clearing old entries and installing the new chain. Each member advances independently.
- Give required policies a minimum accepted version. Decide which optional mappings can remain empty or temporarily stale.
Host adapter selection
Host adapter selection
LCM host pre-execution policy · proposed refresh contract
Locate the hot read in the request path
- A host policy runs mandatory validation, then selects the adapter chain for the channel, executing service and category.
- ChannelServiceAdapterSingleton groups entries by the composite key. The getter sorts configured sequence numbers, then the policy runner invokes the selected adapters. An empty result yields no adapters from this lookup. Mandatory validation has its own execution boundary.
- The loader reads channel/service adapter configuration, builds a replacement map and refreshes the singleton on a ten-minute timer. Each classloader owns its own copy.
- Allowance and utilization use business data. Recheck them in the transaction accepting the operation. An adapter lookup can select which checks to run; the cached chain cannot reserve the customer’s remaining amount.
Walk a policy edit while two members serve
| Event | Effect in the current mechanism | Failure to test |
|---|---|---|
| Commit a changed adapter sequence | Two timers may pick up the revision on different cycles | Same request class can select different sequences on A and B. |
| Reader overlaps refill | Writer clears and refills the shared map under a lock; the getter does not acquire that lock | A getter can see an absent or incomplete chain between clear and refill. |
| Database read fails | A failed read can reach population without rows | Distinguish a failed fetch from an intentional empty policy before replacing working rules. |
| New member loads under pressure | Its initial load and periodic task consume JDBC/CPU while ready peers may already have usable copies | Measure startup, reload skew and resource use per member. |
- Ten minutes is the periodic scheduling interval. Query failure, slow loading and a member restart affect how long a generation can be used.
Publish a validated generation through one reference
- Preserve the local hot read. Have one writer per member build a fresh key-to-ordered-chain map from a consistent committed version. Deep-freeze the lists as well as the enclosing map.
- For each key, validate sequence order and adapter availability. Represent an intentionally empty optional mapping explicitly. For a required chain, a missing key yields a controlled refusal.
- Replace the active reference in one atomic operation. A request takes that reference once; concurrent requests see either the old complete chain or the new complete chain.
- Keep a minimum allowed version for revocations/mandatory policy. On failed reload, retain last-known-good only when that version meets the route contract. Without an acceptable generation, reject that route and alert its owner.
- A committed change hint may speed refresh. Retain periodic version reconciliation for missed hints; fence late results against the highest committed version known to that member.
- For a revocation that must apply immediately, the request needs a trusted current minimum version, or traffic must pause until every eligible member acknowledges it. A member that missed a hint cannot infer a newer minimum from its own old copy.
Illustrative channel/service adapter release contractjson
{
"purpose": "Illustrative acceptance cases for an immutable host adapter-policy generation",
"policyKey": {"channel": "sample-channel", "service": "offer-operation", "category": "sample-category"},
"committedVersion": 8,
"requiredMinimumVersion": 8,
"orderedChain": [{"sequence": 1, "adapter": "validate-input"}, {"sequence": 2, "adapter": "check-operation-policy"}],
"cases": [
{"input": "Complete version 8 after validating every required adapter", "expect": "Publish one immutable generation"},
{"input": "Version 7 builder completes late", "expect": "Keep version 8 active"},
{"input": "Query fails while 8 is required and only 7 is available", "expect": "Reject this required route; do not install empty configuration"},
{"input": "Successful version 9 explicitly disables an optional route chain", "expect": "Install intentional empty optional mapping; keep mandatory validation"},
{"input": "Member B misses the commit notification", "expect": "Polling eventually detects the new version; urgent revocation requires an authoritative minimum or a traffic hold until every serving member acknowledges it"}
]
}
Prove policy behavior before replacing the loader
- Warm A and B, make the database read fail for A, and commit V8 removing a revoked adapter while B reloads. Capture selected chain/version for synthetic requests.
- Force a slow V7 refresh to finish after V8, then restart one member with the config database unavailable. Test required, optional and unknown keys independently.
- Compare selection latency, refresh duration, allowed staleness and heap at peak build time. Holding active and candidate generations uses additional memory.
- Retain a compatible version through rollback; replay the versioned configuration and keep revocations enforced. Introduce replicated cache infrastructure only if a measured requirement justifies its consistency and outage dependencies.
Serving health and business progress
WebLogic managed servers and Prometheus · proposed progress alerts
Three paths answer different questions
| Question | Signal path | Operational meaning |
|---|---|---|
| Can the member answer its framework check? | Health loop waits for WebLogic readiness, then invokes the health servlet and framework/DMS helper. A failure condition can write NodeManager state. | A local process-management signal. Verify resulting state transition and restart policy independently. |
| Are Kubernetes and WebLogic resources observable? | Prometheus pulls from configured infrastructure and annotated endpoints. The replica exporter reads Domain, Cluster and replica resources. | Target state, scraping and replica intent describe different stages. |
| Has an operation reached its required state? | Offer/upload and CP processors write durable state and business audit. SQL exporter queries aggregate selected offer, file and suppression audit records. | Identify the expected stage, durable evidence and oldest unfinished work before replay. A successful metrics scrape alone proves reachability. |
- Alertmanager routes notifications to a configured webhook. Scaling also requires an authorized controller, capacity policy, writable target and observed reconciliation.
- Java/GC logs and the asynchronous logging adapter carry diagnostic events. Use correlation IDs to find related work. Durable stage identity and outcome live with the business owner.
Worked failure: healthy members, stalled upload
- A member answers health checks while claimed rows age without dispatch. Check claim generation, pending intent or broker acceptance, MDB progress and downstream JDBC headroom before increasing replicas.
- During an expected CP file window, queued injection may be deliberate. Evaluate the oldest eligible stage against the active window and drain budget. An ambiguous remote operation goes to reconciliation.
- Traffic withdrawal can stop new HTTP selection while schedulers and MDBs continue. Fence the old owner or suspend its consumer through the workload’s release procedure before transferring work.
Shadow a progress rule and its measurement failure
- A proposed stage reader returns pending count, age of the oldest pending row and query success from the same bounded work set. Emit zero age only after a successful empty result.
- The illustrative upload rule uses five minutes of age and two minutes of continuous breach. Define the operational threshold from the business deadline and measurement cadence.
- Export one series per bounded workflow/stage. Keep PAN, account, operation ID, dynamic exception and raw SQL text out of labels. Use restricted audit/log lookup for individual cases.
- Track a failed/absent reader separately so a missing sample cannot appear to be a healthy empty queue. Verify scrape target discovery, expected label sets, read-only SQL grants, query plans, timeout and total DB cost before enabling paging.
- Pilot notification only. Link the alert to inspection and recovery steps. Test the diagnostic pipeline failing while healthy work continues, then a stalled stage while process health stays green. Disable the proposed reader/rule independently of existing audit writes.
Illustrative stage-age and measurement-health alert rulesyaml
# Illustrative Prometheus rule group. These metrics require an instrumented
# durable stage reader. Emit one bounded label set per workflow, not per loan.
groups:
- name: lcm-business-progress
rules:
- alert: LCMStageStalled
expr: |
(lcm_stage_oldest_pending_age_seconds{workflow="upload",stage="dispatch"} > 300)
and on (job, instance, workflow, stage)
(lcm_stage_pending{workflow="upload",stage="dispatch"} > 0)
and on (job, instance, workflow, stage)
(lcm_stage_query_success{workflow="upload",stage="dispatch"} == 1)
for: 2m
labels:
severity: warning
annotations:
summary: "Upload dispatch is behind its illustrative progress budget"
action: "Inspect durable claim age, worker ownership and broker availability"
- alert: LCMStageMeasurementUnavailable
expr: |
(up{job="lcm-stage-reader"} == 0)
or (lcm_stage_query_success{job="lcm-stage-reader"} == 0)
or absent(lcm_stage_query_success{job="lcm-stage-reader",workflow="upload",stage="dispatch"})
for: 2m
labels:
severity: warning
annotations:
summary: "The stage reader cannot report upload dispatch progress"