Copilot commented on code in PR #13328:
URL: https://github.com/apache/trafficserver/pull/13328#discussion_r3576698323
##########
src/iocore/cache/AggregateWriteBuffer.cc:
##########
@@ -49,7 +49,6 @@ AggregateWriteBuffer::flush(int fd, off_t write_pos) const
{
int r = pwrite(fd, this->_buffer, this->_buffer_pos, write_pos);
Review Comment:
`AggregateWriteBuffer::flush()` assumes a single `pwrite()` writes the
entire aggregation buffer. If `pwrite()` writes fewer bytes than requested,
this returns `false` even though the write may be partially successful, which
can incorrectly trigger shutdown error handling (e.g., invalidating the
shm-backed directory and skipping later sync work).
Consider looping until all bytes are written (or a hard failure occurs) so
short writes are handled correctly.
--
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]