You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "cchung100m (via GitHub)" <gi...@apache.org> on 2026/10/23 05:52:34 UTC

Re: [PR] HDDS-16751. Fix possible NPE in KeyInputStream#getBlockLocationInfo during block location refresh [ozone]

cchung100m commented on PR #11435:
URL: https://github.com/apache/ozone/pull/11435#issuecomment-6358431647

   HI @peterxcli 
   
   Thanks for the suggestion and the diff! I agree that the null check was only needed because the retry function `RpcClient` swallowed the `IOException` and returned null, so I've applied your refactor:
   
   - Changed the retry function type from `Function<OmKeyInfo, OmKeyInfo>` to `CheckedFunction<OmKeyInfo, OmKeyInfo, IOException>` in `KeyInputStream`, `RpcClient`, and `TestBlockTokens`.
   - Moved the `IOException` catch and error log into the retry lambda in `KeyInputStream#createSteams`. It still returns null on a failed lookup, which `BlockExtenedInputStrem#refreshBlockInfo` already handles.


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