oscerd commented on PR #29555: URL: https://github.com/apache/camel/pull/29555#issuecomment-6790686652
Pushed `CAMEL-26588: Address review feedback - a new lock drops both caches, and the first named re-read happens before the claim is published` (c9183a7ff8b2) on top of 88e5dc781348: - `openAndLock` clears `keyCache` and `metadataCache` entirely when it takes a new lock, whatever name the claim was made under and also when it has none, so a later read under any name comes from the store. - `claimStatefulKeyBeforeSign` does the first re-read, when the claim has a name, inside the claim lock before `statefulKeyClaimed` is published, and seeds `statefulKeyAdoptions` with that name; a concurrent exchange under another name, or none, waits for it instead of signing from the key loaded at startup. - Tests: `anUnnamedClaimReadsTheStoreAgainToo` (manager, claim with `null`, `getKey(KEY_ID)` gives the advanced key and the stored usage count) and `anUnnamedFirstExchangeDoesNotHideTheStoredIndexFromALaterNamedOne` (producer with two file-based managers on one directory: the previous owner advanced the key, the first exchange after the handover carries no header, the next names the key and both signatures come from the stored index). - The "Single Ownership of a Stateful Key" section now says that resuming from the stored index needs the header: an unnamed claim serialises the signers but nothing names the copy to read back. On the minor point: a key whose public key gives no encoding keeps the name as its lock name, so for such a key the lock is indeed header-bound. The alternative would be to refuse the claim for it, which would stop opaque keys from signing at all; since BC's LMS and XMSS keys always encode, I left the fallback and documented it in the Javadoc of `claimStatefulKey`. camel-pqc module: 353 tests, 0 failures. 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]
