camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Truitt (JIRA)" <>
Subject [jira] [Commented] (CAMEL-6144) Optimistic Locking Required for JdbcAggregationRepository in order for Camel Aggregation to work in a Clustered environment
Date Wed, 10 Sep 2014 21:44:34 GMT


Benjamin Truitt commented on CAMEL-6144:

[~krsmes] - I think the problem is that this issue's description reports two separate (but
related) problems, by its own admission: "Listing two problems here. "

I suggest creating a separate issue for the problem that you've pointed out still seems to

> Optimistic Locking Required for JdbcAggregationRepository in order for Camel Aggregation
to work in a Clustered environment
> ---------------------------------------------------------------------------------------------------------------------------
>                 Key: CAMEL-6144
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-sql
>    Affects Versions: 2.9.2
>         Environment: Camel Aggregation in more than one server each of them using JDBCAggregationRepository
and using a common DB table to store aggregated exchanges.
>            Reporter: Shivakumar
>            Assignee: Claus Ibsen
>             Fix For: 2.12.0
> Listing two problems here. And a solution that is needed to fix these problems.
> 1) A Race condition leading to below ConstraintViolationException when two Camel Aggregator's
trying to insert into the AGGREGATION DB table for same correlationkey(ID). 
> "org.hibernate.exception.ConstraintViolationException: ORA-00001: unique constraint (USLDB_UAT2.AGGREGATION_PK)
> at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(
> at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(
> at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(
> at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(
> at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(
> at $Proxy171.executeUpdate(Unknown Source)
> at
> at
> at org.springframework.jdbc.core.JdbcTemplate.execute(
> at org.springframework.jdbc.core.JdbcTemplate.execute(
> at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository$1.doInTransaction(
> at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository$1.doInTransaction(
> at
> at org.apache.camel.processor.aggregate.jdbc.JdbcAggregationRepository.add(
> at org.apache.camel.processor.aggregate.AggregateProcessor.doAggregation(
> at org.apache.camel.processor.aggregate.AggregateProcessor.process(
> at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(As..."
> 2) A similar Race condition happens when more than one Camel Aggregator(s) tries to update
a row in the AGGREGATION table. This problem does not lead into any exceptions. But it leads
into missing exchanges. Because both the Aggregator's are trying to update the same row in
the AGGREGATION table, But one update is overwritten by other update, thus losing an exchange.
> ==========
> Optimistic locking should be enabled / applied  for JdbcAggregationRepository to handle
this race condition.

This message was sent by Atlassian JIRA

View raw message