sodonnel commented on a change in pull request #3085:
URL: https://github.com/apache/ozone/pull/3085#discussion_r808521994
##########
File path:
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerInfo.java
##########
@@ -219,7 +226,6 @@ public void updateLastUsedTime() {
public HddsProtos.ContainerInfoProto getProtobuf() {
HddsProtos.ContainerInfoProto.Builder builder =
HddsProtos.ContainerInfoProto.newBuilder();
- Preconditions.checkState(containerID > 0);
Review comment:
Inside the ContainerID constructor, the same pre-condition is there:
```
public ContainerID(long id) {
Preconditions.checkState(id >= 0,
"Container ID should be positive. %s.", id);
this.id = id;
}
```
So if we have a ContainerID instance inside this class, which we now must
have rather than the long value, it must have a value greater than zero making
this check redundant.
--
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]