Benjamin BONNET created CAMEL-17616:
---------------------------------------
Summary: JdbcAggregationRepository will not start if it contains
too many exchanges
Key: CAMEL-17616
URL: https://issues.apache.org/jira/browse/CAMEL-17616
Project: Camel
Issue Type: Bug
Components: camel-sql
Affects Versions: 3.11.2
Reporter: Benjamin BONNET
Hi,
We are using a JdbcAggregationRepository with a transactional Datasource. When
JdbcAggregationRepository is started, if its table contains lots of rows, a
transaction timeout may occur and make it fail to start.
Actually, when repo starts, doStart method is invoked, that method calls
getKeys() and iterates over every row in order to count them, which may be
quite long if repo contains millions of rows.
In order to avoid that issue, count could be implemented directly in the SQL
query.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)