Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-13784

Dropped exchanges when aggregating with JdbcAggregationRepository

    XMLWordPrintable

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • fuse-7.6-GA
    • fuse-7.7-GA
    • Camel, Fuse Standalone
    • None
    • fuse-7.7-build5
    • -

    Description

      The CU would like to use the JdbcAggregationRepository (camel-sql) in a distributed environment (multiple independent threads or multiple JVMs).

      The assumption here is that the JdbcAggregationRepository with optimistic locking enabled would prevent any race condition from occurring, because synchronization should happen at the database level. In practice it doesn't seem to work: when running more than one thread we have silently dropped exchanges.

      The JdbcAggregationRepository optimistic locking implementation seems to cover only the race condition that happens when two aggregators are trying to insert into the aggregation table for the same correlationId (pk). Instead, it does not cover the race when more than one Camel aggregator tries to update a row in the "aggregation" table for the same correlationId (lost updates problem).

      The javadoc for OptimisticLockingAggregationRepository.add says that the implementation should store a version identifier, but this is not the case with JdbcAggregationRepository implementation.

      Attachments

        Activity

          People

            ldemasi Luigi De Masi
            rhn-support-fvaleri Federico Valeri
            Tomas Turek Tomas Turek
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: