chungen0126 commented on code in PR #11551:
URL: https://github.com/apache/ozone/pull/11551#discussion_r4333091344
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/StreamBlockInputStream.java:
##########
@@ -431,6 +446,27 @@ private XceiverClientGrpc
acquireGrpcClientForReadData(XceiverClientFactory fact
return (XceiverClientGrpc) acquired;
}
+ /**
+ * Use the block length from the datanode if the block is under construction,
+ * since the length from OM may be stale (e.g. the last block of an hsync-ed
file).
+ */
+ public synchronized void updateBlockLength() throws IOException {
+ while (needUpdateBlockLength) {
Review Comment:
The loop is for retries, and it is bounded: handleExceptions() calls
shouldRetryRead() with the existing retryPolicy (same as initialize() for the
streaming reader) and rethrows once the policy gives up. Non-retriable
exceptions are rethrown immediately.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]