Sergey Soldatov created HDDS-15421:
--------------------------------------

             Summary: BlockOutputStream.writeOnRetry() can commit a partially 
filled retry buffer as a normal chunk.
                 Key: HDDS-15421
                 URL: https://issues.apache.org/jira/browse/HDDS-15421
             Project: Apache Ozone
          Issue Type: Bug
          Components: Ozone Client
    Affects Versions: 2.1.0
            Reporter: Sergey Soldatov
            Assignee: Sergey Soldatov


When a RATIS pipeline failure is detected asynchronously, the client may 
already have written additional data into the next ChunkBuffer. KeyOutputStream 
computes retry length from all allocated buffers, including a partially filled 
current buffer. During retry, BlockOutputStream.writeOnRetry() sends each 
allocated buffer as WriteChunk + PutBlock, so the partial buffer is committed 
immediately.
If later writes continue in the same block, that partial chunk becomes a 
non-last chunk. Server-side read/checksum code assumes non-last chunks have the 
configured chunk size, so reads can fail with a bytesPerChunk 
assertion/checksum error.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to