nandakumar131 commented on code in PR #8386:
URL: https://github.com/apache/ozone/pull/8386#discussion_r2084524172
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/safemode/HealthyPipelineSafeModeRule.java:
##########
@@ -122,21 +131,65 @@ protected synchronized boolean validate() {
@Override
protected synchronized void process(Pipeline pipeline) {
+ Preconditions.checkNotNull(pipeline);
// When SCM is in safe mode for long time, already registered
// datanode can send pipeline report again, or SCMPipelineManager will
// create new pipelines.
- Preconditions.checkNotNull(pipeline);
- if (pipeline.getType() == HddsProtos.ReplicationType.RATIS &&
- ((RatisReplicationConfig) pipeline.getReplicationConfig())
- .getReplicationFactor() == HddsProtos.ReplicationFactor.THREE &&
- !processedPipelineIDs.contains(pipeline.getId())) {
- getSafeModeMetrics().incCurrentHealthyPipelinesCount();
- currentHealthyPipelineCount++;
- processedPipelineIDs.add(pipeline.getId());
- unProcessedPipelineSet.remove(pipeline.getId());
+
+ // Only handle RATIS + 3-replica pipelines.
+ if (pipeline.getType() != HddsProtos.ReplicationType.RATIS ||
+ ((RatisReplicationConfig)
pipeline.getReplicationConfig()).getReplicationFactor() !=
+ HddsProtos.ReplicationFactor.THREE) {
+ SCMSafeModeManager.getLogger().warn(
+ "Skipping pipeline safemode report processing as Replication type
isn't RATIS " +
+ "or replication factor isn't 3.");
Review Comment:
Change this log level to debug.
Receiving `PipelineReport` for `Pipelines` with replication factor of one is
common. This is not something wrong, we should just skip over those `Pipelines`.
--
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]