Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 24CCC200B27 for ; Wed, 22 Jun 2016 10:58:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 237E0160A2E; Wed, 22 Jun 2016 08:58:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 52D08160A64 for ; Wed, 22 Jun 2016 10:57:59 +0200 (CEST) Received: (qmail 8022 invoked by uid 500); 22 Jun 2016 08:57:58 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 7981 invoked by uid 99); 22 Jun 2016 08:57:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2016 08:57:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2329C2C1F5D for ; Wed, 22 Jun 2016 08:57:58 +0000 (UTC) Date: Wed, 22 Jun 2016 08:57:58 +0000 (UTC) From: "Richard Vigniel (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-10084) AggregateProcessor/JdbcAggregationRepository : table COMPLETED not cleaned when AggregationStrategy.aggregate does not return oldExchange MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 22 Jun 2016 08:58:00 -0000 [ https://issues.apache.org/jira/browse/CAMEL-10084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard Vigniel updated CAMEL-10084: ------------------------------------ Component/s: camel-core > AggregateProcessor/JdbcAggregationRepository : table COMPLETED not cleaned when AggregationStrategy.aggregate does not return oldExchange > ------------------------------------------------------------------------------------------------------------------------------------------ > > Key: CAMEL-10084 > URL: https://issues.apache.org/jira/browse/CAMEL-10084 > Project: Camel > Issue Type: Bug > Components: camel-core, camel-sql > Affects Versions: 2.16.2 > Reporter: Richard Vigniel > > Hi, > in AggregateProcessor + JdbcAggregationRepository : > the table _AGG_COMPLETED is not cleaned when AggregationStrategy.aggregate() does returns newExchange . > it is ok when aggregate() returns oldExchange, > looking at the code at these places: > https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java#L662 > https://github.com/apache/camel/blob/master/components/camel-sql/src/main/java/org/apache/camel/processor/aggregate/jdbc/JdbcAggregationRepository.java#L317 > https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java#L694 > it works as follow: > 1. AggregateProcessor asks to remove oldExchange from _AGG. it gives correlationKey and oldExcange as parameter > 2. JdbcAggregationRepository deletes exchange from _AGG with correlationKey and insert given exchange (oldExchange) in _AGG_COMPLETED > 3. AggregateProcessor confirms exchange is complete, and ask JdbcAggregationRepository to delete aggregated exchange from _AGG_COMPLETED > *if aggregated exchange does not have the same id as oldExchange, point 3 does nothing and oldExchange stays in _AGG_COMPLETED* > the problem seems to be in point 2, the aggregatedExchange should be given instead of oldExchange. > the aggregation works fine, but the _AGG_COMPLETED fills up and recovery will definitely not work in this scenario. > workaround: always return oldExchange in AggregationStrategy.aggregate() -- This message was sent by Atlassian JIRA (v6.3.4#6332)