oscerd commented on PR #29098:
URL: https://github.com/apache/camel/pull/29098#issuecomment-6654175815

   Pushed `CAMEL-26547: Address review feedback - one lock channel per file in 
the JVM, holders counted per key, store re-read on a new claim, and no adoption 
of another key` (1f647786205a) on top of ad4aa82f6990:
   
   - `FileBasedKeyLifecycleManager` registers each lock file it holds in a 
JVM-wide map keyed by the real path of the file and refuses a second manager of 
the same directory there, before any second channel is opened, so nothing is 
left for the `Cleaner` to close behind the first holder's lock and no 
descriptor leaks per refused exchange. A channel that meets a lock taken 
outside this class is kept referenced rather than closed.
   - The claims of one manager are counted per key: producers that share a 
manager do not release each other's claim, the key is given back by the last 
holder. This folds CAMEL-26588 back in, as both reviews asked.
   - Taking a new lock evicts the cached key and metadata, so the re-read after 
the claim comes from the store and the arriving instance resumes from the index 
the previous owner reached.
   - The producer adopts the stored key only when its public key encodes the 
same as the one loaded at startup; another key under the same id is kept out 
with a warning.
   
   Tests: a second manager through a symbolic link is refused, two managers on 
one directory see the store again after a claim, a key claimed twice is given 
back on the second release, a stored key that is another key is not adopted. 
camel-pqc module: 341 tests, 0 failures. The key-lifecycle page and the 
interface Javadoc are updated. All four open threads are answered; review 
re-requested.
   
   _Claude Code on behalf of oscerd_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to