xmg333 commented on PR #18463:
URL: 
https://github.com/apache/dolphinscheduler/pull/18463#issuecomment-6109135901

   All three points are addressed in 176655c350:
   
   - **Premature EOF**: an EOF/empty chunk that ends before the pinned length 
now throws instead of
     returning — the response is aborted, nothing short is published. When the 
pin is unknown
     (`observedLength == 0`, i.e. the pre-PR worker during a rolling upgrade) 
there is nothing to
     compare, so the EOF-only termination stays; that's spelled out in the 
javadoc.
   - **Shrink below the pin**: a later chunk reporting a length below the pin 
is rejected before its
     bytes are written (in-place truncation, or rotation to a shorter file).
   - **Coverage**: the previous rotation test only shrank the file below the 
delivered offset. The new
     unit tests cover shrinking above the delivered offset, shrinking to 
exactly the offset, and
     premature EOF with no `observedLength`. The integration test now cuts a 
real 9 MiB log to 8.5 MiB
     while the download is in flight over the real Netty RPC — the new length 
is above the delivered
     offset, so the worker's own truncation check stays silent and the API has 
to fail by itself.
   
   Both rejection paths carry the task instance id and host, so the aborted 
download is attributable in
   the API log.


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