Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-17616

JdbcAggregationRepository will not start if it contains too many exchanges

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.11.2
    • 3.11.6, 3.14.2, 3.16.0
    • camel-sql
    • None
    • Unknown

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bbonnet Benjamin BONNET
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: