ashishkumar50 commented on code in PR #4655:
URL: https://github.com/apache/ozone/pull/4655#discussion_r1192046443
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/health/EmptyContainerHandler.java:
##########
@@ -88,9 +88,9 @@ public boolean handle(ContainerCheckRequest request) {
private boolean isContainerEmptyAndClosed(final ContainerInfo container,
final Set<ContainerReplica> replicas) {
return container.getState() == HddsProtos.LifeCycleState.CLOSED &&
- container.getNumberOfKeys() == 0 && replicas.stream()
Review Comment:
This is the intention of change, We don't want to depend on keyCount(which
can be non zero even though container is empty) to determine whether container
is empty or not, in some situation keyCount has gone wrong. Instead now we use
empty flag for checking whether replica is empty or not based on the results
from all replica, and that will judge container is empty or not.
--
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]