ptlrs commented on code in PR #9947:
URL: https://github.com/apache/ozone/pull/9947#discussion_r3192515623
##########
hadoop-hdds/managed-rocksdb/src/main/java/org/apache/hadoop/hdds/utils/db/managed/ManagedRocksDB.java:
##########
@@ -75,6 +75,14 @@ public static ManagedRocksDB openReadOnly(
);
}
+ public static ManagedRocksDB openAsSecondary(
Review Comment:
Good suggestion. I have added some documentation.
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java:
##########
@@ -322,8 +342,20 @@ public VolumeCheckResult checkDbHealth(File dbFile) throws
InterruptedException
throw new InterruptedException("Check of database for volume " + this
+ " interrupted.");
}
- LOG.error("Could not open Volume DB located at {}", dbFile, e);
- getIoTestSlidingWindow().add();
+ // openAsSecondary writes its info LOG into secondaryDir. If that write
+ // fails because the disk is full, RocksDB surfaces the failure as
+ // IOError(NoSpace) (mapped from ENOSPC). That is unrelated to DB
+ // integrity, so don't count it against the sliding window. Any other
+ // status (permission denied, missing path, corruption, generic IO
+ // error) is still treated as a real failure.
+ if (ManagedRocksDB.isNoSpaceFailure(e)) {
Review Comment:
I agree this is needed but it is already covered in two places.
- HddsVolume.checkVolumeUsages will flag absence of space. Our secondary
instance may fail if between the checkVolumeUsages and checkDbHealth the space
gets filled up
- hdds.datanode.volume.min.free.space can be used to ensure that we have
that 10-15% space available
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java:
##########
Review Comment:
Updated
--
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]