rich7420 commented on code in PR #9905:
URL: https://github.com/apache/ozone/pull/9905#discussion_r2975034484
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/io/RandomAccessFileChannel.java:
##########
@@ -86,22 +99,31 @@ public synchronized boolean read(ByteBuffer buffer) throws
IOException {
* In case of exception, this method catches the exception, logs a warning
message,
* and then continue closing the remaining resources.
*/
+ @Override
public synchronized void close() {
- if (blockFile == null) {
+ final File fileToClose = blockFile;
Review Comment:
Oh I think it fixes an existing logging bug. In the original code, blockFile
was set to null before closing the channel, so if an IOException occurred, the
log incorrectly printed null instead of the file name.
--
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]