gnodet-bot commented on code in PR #30360:
URL: https://github.com/apache/camel/pull/30360#discussion_r4625669539


##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -4225,6 +4225,20 @@ again. With `transacted=true` the SQL and MyBatis 
consumers break out of the bat
 `markRollbackOnlyLast()` reaches the consumer only when no `transacted()` EIP 
has consumed the flag, so the
 consumer's own transaction is the last one.
 
+=== camel-sql - onConsumeBatchComplete is not run when the consumer stops 
before the end of the batch
+
+The `onConsumeBatchComplete` query runs after the consumer has routed the 
whole batch. When the consumer was stopped
+while it routed a batch (a route stop, a CamelContext shutdown or a route 
reload), it left the batch and still ran the
+query, so a query such as `delete from projects`, or an update that marks the 
rows as processed, also took the rows
+that were never routed, and they were lost. The query is now not run when the 
consumer routed only part of the batch
+(logged at INFO), and the next poll reads the rows that were not routed.
+
+A route that uses `onConsumeBatchComplete` alone (without `onConsume`) to 
delete or mark the rows now also leaves the

Review Comment:
   🔤 **Nit (optional):** The first sentence of this paragraph runs 47 words 
with a double-negative construction ("also leaves … as they are … where before 
the rows that were not routed were lost") that is hard to parse on first read.
   
   Suggested rewrite:
   
   > A route that uses `onConsumeBatchComplete` alone (without `onConsume`) to 
delete or mark rows now behaves differently on partial batches. Previously, 
unrouted rows were deleted or marked (data loss). Now, all rows in the batch 
remain untouched — so already-routed rows are re-processed after a restart.
   
   The sentence wraps across lines 4236–4237 — apply the split manually.



##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -4225,6 +4225,20 @@ again. With `transacted=true` the SQL and MyBatis 
consumers break out of the bat
 `markRollbackOnlyLast()` reaches the consumer only when no `transacted()` EIP 
has consumed the flag, so the
 consumer's own transaction is the last one.
 
+=== camel-sql - onConsumeBatchComplete is not run when the consumer stops 
before the end of the batch
+
+The `onConsumeBatchComplete` query runs after the consumer has routed the 
whole batch. When the consumer was stopped

Review Comment:
   🔤 **Nit (optional):** The second sentence in this paragraph runs 58 words 
across four chained clauses, which makes it hard to follow.
   
   Suggested split:
   
   > When the consumer stopped mid-batch (route stop, CamelContext shutdown, or 
route reload), it still ran the query. As a result, a `delete from projects` 
query — or an update that marks rows as processed — also affected rows that 
were never routed, and those rows were lost.
   
   The sentence wraps across lines 4230–4234 — apply the split manually.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to