Andrea Cosentino created CAMEL-26830:
----------------------------------------
Summary: camel-opa - reject queued WASM borrows after policy pool
closure
Key: CAMEL-26830
URL: https://issues.apache.org/jira/browse/CAMEL-26830
Project: Camel
Issue Type: Bug
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
h2. Problem / motivation
OpaWasmPolicyPool.borrow checks closed before waiting for a permit. A borrower
queued before close can later acquire a returned permit and call factory.get
after closure.
h2. Proposed scope
Check pool closure after permit acquisition and release the permit before
rejecting a queued borrower. Define safe close/return synchronization so
shutdown cannot leave newly published idle policies or leak permits.
h2. Acceptance criteria / validation
* Latch-controlled test: hold the sole lease, queue another borrower, close the
pool, return the lease; queued borrow must fail.
* Cover interrupted/expired waiters, concurrent close/return, factory failures
and exactly-once permit release.
h2. References
*
https://github.com/apache/camel/blob/5686684cb418/components/camel-opa/src/main/java/org/apache/camel/component/opa/OpaWasmPolicyPool.java#L66
*
https://github.com/apache/camel/blob/5686684cb418/components/camel-opa/src/test/java/org/apache/camel/component/opa/OpaWasmPolicyPoolTest.java
Source: read-only component audit at 5686684cb418. Recheck current main before
implementing; historical references identify the audited code.
_AI-generated by Codex on behalf of oscerd (JIRA: acosentino)._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)