sadanand48 commented on code in PR #9953:
URL: https://github.com/apache/ozone/pull/9953#discussion_r2999274921
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/safemode/AbstractContainerSafeModeRule.java:
##########
@@ -135,14 +181,48 @@ public double getCurrentContainerThreshold() {
@Override
public synchronized void refresh(boolean forceRefresh) {
- if (forceRefresh || !validate()) {
+ if (forceRefresh) {
initializeRule();
}
+ if (!validate()) {
+ // iterate through open containers and check if any of them have moved
to closed state
+ for(ContainerID containerID : openContainers.keySet()) {
+ try {
+ ContainerInfo containerInfo =
containerManager.getContainer(containerID);
+ if (isClosed(containerInfo)) {
+ addContainer(containerInfo);
+ openContainers.remove(containerID);
+ closedContainers.put(containerID, containerID);
Review Comment:
Refresh should only update the list of expected containers. Actual counting
is done as part of process(). I want to keep the behaviour this way.
--
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]