rakeshadr commented on code in PR #10157:
URL: https://github.com/apache/ozone/pull/10157#discussion_r3371742820
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/safemode/HealthyPipelineSafeModeRule.java:
##########
@@ -97,8 +101,7 @@ private int getMinHealthyPipelines(ConfigurationSource
config) {
HddsConfigKeys.HDDS_SCM_SAFEMODE_MIN_DATANODE,
HddsConfigKeys.HDDS_SCM_SAFEMODE_MIN_DATANODE_DEFAULT);
- // We only care about THREE replica pipeline
- return minDatanodes / HddsProtos.ReplicationFactor.THREE_VALUE;
+ return minDatanodes / targetRequiredNodes;
Review Comment:
EC safemode readiness isn't about pipelines — it's about having enough
healthy DNs registered
```
if (targetReplicationConfig.getReplicationType() == EC) {
// EC pipelines are ephemeral — they don't survive SCM restarts and
// are created on-demand. Requiring existing pipelines here would
// deadlock safemode on every restart. The DN safemode rule already
// enforces HDDS_SCM_SAFEMODE_MIN_DATANODE, so return 0 to make this
// rule a no-op for EC. The threshold floor of 0 means validate()
// passes if openPipelines >= floor(0 * percent) = 0.
return 0;
}
return minDatanodes / HddsProtos.ReplicationFactor.THREE_VALUE;
```
The DN count threshold belongs in a separate safemode exit rule — checking
that registeredHealthyDNs >= ecScheme.data + ecScheme.parity before exiting.
That's a clean addition to SCMSafeModeManager, not a hack into the pipeline
formula. Something like:
// In SCMSafeModeManager, when defaultReplication is EC:
int requiredDNs = defaultECConfig.getData() + defaultECConfig.getParity();
// validate: nodeManager.getNodeCount(NodeStatus.inServiceHealthy()) >=
requiredDNs
--
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]