davsclaus opened a new pull request, #30393:
URL: https://github.com/apache/camel/pull/30393

   ## Backport of #30368
   
   Backport of #30368 (CAMEL-27225: camel-redis - RedisAggregationRepository 
stores exchanges in Java serialization and reads them through a deserialization 
filter) onto `camel-4.22.x`, for 4.22.3.
   
   JIRA: [CAMEL-27225](https://issues.apache.org/jira/browse/CAMEL-27225)
   
   **Original PR:** #30368 (squash commit f5dfccb98347)
   **Original author:** @davsclaus
   **Target branch:** `camel-4.22.x`
   
   ### Straight or adapted
   
   Adapted. The camel-redis code on `main` has later changes that are not on 
this branch, so this is a port of the same behaviour to the 
`RedisAggregationRepository` of `camel-4.22.x`:
   
   - **Same behaviour and options as `main`:**
     - `deserializationFilter`;
     - `codec` (`advanced,security`, `insecure:serialization`);
     - the WARN at start, on the first 100 entries;
     - `recover()` skipping an exchange it cannot read, with a WARN once per 
exchange.
   
     It uses `CamelObjectInputStream` and `DeserializationFilterHelper`, which 
exist on this branch.
   - **Optimistic remove:** this branch has no optimistic remove Lua script. So 
the encoding of the script arguments from `main` is not ported, and the 
optimistic remove keeps this branch's `cache.remove(key, holder)` plus 
`persistedCache.put(...)`, now on the `byte[]` values.
   - **Pessimistic remove:** keeps this branch's logic. The transaction maps 
use the repository codec.
   - **Version wording:** "4.22.2 or older", and the WARN points to the Camel 
4.22 upgrade guide.
   - **Generated files:** the configurer and the bean JSON are rebuilt on this 
branch, and the bean JSON is copied to the catalog.
   - **Upgrade guide:** the entry is left out of this PR. The 4.22.3 note goes 
into `camel-4x-upgrade-guide-4_22.adoc` on `main`, in a separate doc PR.
   
   ### Tests
   - `RedisAggregationRepositoryDeserializationTest`: 14 tests pass.
   - ITs against Redis: `AggregateRedisIT` (1), 
`RedisAggregationRepositoryOperationsIT` (14) and 
`RedisAggregationRepositoryCodecIT` (15) pass. The codec IT includes reading 
entries written the old way, with `Kryo5Codec`.
   - On the unpatched branch, a body of a class outside the filter is read 
back. With the change, it is refused.
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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