You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ss77892 (via GitHub)" <gi...@apache.org> on 2026/10/04 04:44:35 UTC
[PR] HDDS-16704. ReadBlock fails with IllegalStateException when a response is shorter than responseDataSize [ozone]
ss77892 opened a new pull request, #11402:
URL: https://github.com/apache/ozone/pull/11402
## What changes were proposed in this pull request?
HDDS-16704. ReadBlock fails with IllegalStateException when a response is shorter than responseDataSize
KeyValueHandler.readBlockImpl uses ReadBlockComputation to compute a checksum-aligned buffer limit per response.
ReadBlockComputation.computeBufferLimit() calls findChunk(offset + responseDataSize) to locate the chunk at the end of
the window, which advances the forward-only cursor (lastPosition) to offset + responseDataSize. Whenever that response was shorter than responseDataSize (an unaligned chunk boundary inside the window, i.e. variable-sized chunks after hsync, or a short file read), the new position is below lastPosition and Preconditions.assertTrue(position >= lastPosition) throws IllegalStateException.
Fix: compute the end chunk in computeBufferLimit without moving the findChunk cursor.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16704
## How was this patch tested?
UT.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-16704. ReadBlock fails with IllegalStateException when a response is shorter than responseDataSize [ozone]
Posted by "chungen0126 (via GitHub)" <gi...@apache.org>.
chungen0126 commented on PR #11402:
URL: https://github.com/apache/ozone/pull/11402#issuecomment-5981373177
Merged. Thanks @ss77892 for working on this.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-16704. ReadBlock fails with IllegalStateException when a response is shorter than responseDataSize [ozone]
Posted by "chungen0126 (via GitHub)" <gi...@apache.org>.
chungen0126 merged PR #11402:
URL: https://github.com/apache/ozone/pull/11402
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-16704. ReadBlock fails with IllegalStateException when a response is shorter than responseDataSize [ozone]
Posted by "ss77892 (via GitHub)" <gi...@apache.org>.
ss77892 commented on PR #11402:
URL: https://github.com/apache/ozone/pull/11402#issuecomment-5976679039
@chungen0126 can you please take a look at it? That's an addon for HDDS-15857
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org