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


##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -8743,3 +8743,17 @@ if it configured the proxy.
 It is now deprecated, with a `deprecationNote` that says so, and its 
description no longer claims to configure a proxy.
 Remove `protocol` from the endpoint URI or the configuration. To send the 
client's traffic through a proxy, use
 `proxyProtocol` together with `proxyHost` and `proxyPort`, which the shared 
client builder does apply.
+
+=== camel-file - a resume offset past the end of the file now fails the 
exchange
+
+The file resume support positions the body at the offset recorded for the 
file. It did that with a single unchecked
+`skip(offset)`, and both `InputStream.skip` and `Reader.skip` are specified to 
skip *up to* the requested amount, so the
+return value is the only thing that says where the stream actually is. It was 
discarded.
+
+The reachable case is an offset that no longer fits the file, which is what a 
recorded offset becomes once the file is
+truncated or replaced: the stream ran to the end and the exchange carried an 
empty or short body as if that were the
+file's content. The offset is now honoured in full, and an `EOFException` is 
thrown when the file ends first.
+
+If your offsets can go stale, note that the failing exchange leaves the file 
in place, so the next poll reads the same

Review Comment:
   ⚠️ **Wording:** `the failing exchange leaves the file in place` is only true 
when `moveFailed` is not configured. With `moveFailed` set, the file is moved 
to the failure directory on a failed exchange — users relying on `moveFailed` 
will be confused by this statement.
   
   ```suggestion
   If your offsets can go stale, note that by default (without `moveFailed`) 
the failing exchange leaves the file in place, so the next poll reads the same
   ```



##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -8743,3 +8743,17 @@ if it configured the proxy.
 It is now deprecated, with a `deprecationNote` that says so, and its 
description no longer claims to configure a proxy.
 Remove `protocol` from the endpoint URI or the configuration. To send the 
client's traffic through a proxy, use
 `proxyProtocol` together with `proxyHost` and `proxyPort`, which the shared 
client builder does apply.
+
+=== camel-file - a resume offset past the end of the file now fails the 
exchange
+
+The file resume support positions the body at the offset recorded for the 
file. It did that with a single unchecked
+`skip(offset)`, and both `InputStream.skip` and `Reader.skip` are specified to 
skip *up to* the requested amount, so the
+return value is the only thing that says where the stream actually is. It was 
discarded.
+
+The reachable case is an offset that no longer fits the file, which is what a 
recorded offset becomes once the file is
+truncated or replaced: the stream ran to the end and the exchange carried an 
empty or short body as if that were the

Review Comment:
   ⚠️ **Wording:** `an empty or short body` should be `an empty body`.
   
   An offset past the end of the file causes the stream to run to EOF — the 
body is empty, not short. A *short* `skip()` (what this PR fixes) would leave 
the body starting earlier than the offset, making it longer than expected, not 
shorter. The phrase "short body" is factually incorrect here.
   
   ```suggestion
   truncated or replaced: the stream ran to the end and the exchange carried an 
empty body as if that were the
   ```



-- 
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