Federico Mariani created CAMEL-23714:
----------------------------------------

             Summary: Polish RedisAggregationRepository: fix global lock, add 
catalog metadata, and improve test coverage
                 Key: CAMEL-23714
                 URL: https://issues.apache.org/jira/browse/CAMEL-23714
             Project: Camel
          Issue Type: Improvement
    Affects Versions: 4.20.0
            Reporter: Federico Mariani
            Assignee: Federico Mariani


Bugs:
- Pessimistic add() acquires a single global lock ("aggregationLock") instead 
of a per-key lock, serializing all aggregation operations across all 
correlation keys. The Hazelcast equivalent was fixed to per-key locking in 
CAMEL-22041.
- Exchange marshaling (DefaultExchangeHolder.marshal()) happens inside the lock 
critical section, increasing lock hold time unnecessarily.
- remove() throws RuntimeException instead of RuntimeCamelException. The Redis 
repo was missed in the mass-migration commit 0d33d6f7b5d.
- doInit() does not validate endpoint when redisson is null, leading to a 
NullPointerException in doStart() instead of a clear error message.

Catalog/tooling:
- Missing @Configurer(metadataOnly = true) and class-level @Metadata(label = 
"bean", ...) annotations, so the repository does not appear in the Camel 
catalog.

Test coverage:
- Only one integration test (AggregateRedisIT) covering the basic pessimistic 
happy path. Missing tests for: optimistic locking (happy path and contention), 
recovery cycle (scan/recover/confirm), dead letter channel, custom 
RedissonClient injection, and transaction rollback in remove().



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to