Claus Ibsen created CAMEL-24978:
-----------------------------------

             Summary: camel-core - Internal processor advices: fix bugs found 
in a deep review
                 Key: CAMEL-24978
                 URL: https://issues.apache.org/jira/browse/CAMEL-24978
             Project: Camel
          Issue Type: Bug
          Components: camel-core
            Reporter: Claus Ibsen


A deep review of the routing engine's internal processor 
(CamelInternalProcessor, SharedCamelInternalProcessor, AdviceIterator and the 
built-in advices) found several bugs. Items 1-4 were reproduced against 
4.23.0-SNAPSHOT.

# *rest-openapi (and rest-postman) run each operation twice after a route 
restart.* createConsumer() adds a new RestOpenApiProcessorAdvice on every route 
start without removing the previous one. After stopRoute/startRoute a single 
GET invoked the operation route twice.
# *The debugger "skip over" skips the after advices.* All before() advices have 
run, but the SKIP_OVER branch only calls the callback. The JMX inflight counter 
of the processor never goes down, the message history entry is not finished, 
and with tracing the exchange stays in TraceAdviceEventNotifier forever.
# *An advice whose before() throws leaves earlier advices unfinished.* The 
inflight repository entry, route stack and UoW of the advices that already ran 
are never undone (inflight count for the route stays up).
# *An exception thrown from an advice's after() replaces the exception of the 
route*, so the original failure is lost.
# BacklogTracerAggregateAdvice does not check shouldTrace, so every aggregated 
exchange is dumped and traced in standby mode even when tracing is off.
# Copy/paste bugs in the backlog tracer advices: endpoint service details set 
on the first event instead of the last, and the aggregate last event uses a 
different level than the first.
# addRouteInflightRepositoryAdvice ignores the inflight repository parameter.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to