SpriCoder commented on code in PR #11287:
URL: https://github.com/apache/iotdb/pull/11287#discussion_r1356454576


##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java:
##########
@@ -261,25 +240,11 @@ public TSStatus alterDatabase(DatabaseSchemaPlan 
databaseSchemaPlan) {
     // Alter DatabaseSchema
     try {
       result = getConsensusManager().write(databaseSchemaPlan);
-      // Alter database replication factor metrics
-      metricService
-          .getOrCreateGauge(
-              Metric.REPLICATION_FACTOR.toString(),
-              MetricLevel.CORE,
-              Tag.TYPE.toString(),
-              DATA,
-              Tag.DATABASE.toString(),
-              databaseSchemaPlan.getSchema().getName())
-          .set(databaseSchemaPlan.getSchema().dataReplicationFactor);
-      metricService
-          .getOrCreateGauge(
-              Metric.REPLICATION_FACTOR.toString(),
-              MetricLevel.CORE,
-              Tag.TYPE.toString(),
-              SCHEMA,
-              Tag.DATABASE.toString(),
-              databaseSchemaPlan.getSchema().getName())
-          .set(databaseSchemaPlan.getSchema().schemaReplicationFactor);
+      PartitionMetrics.bindDatabaseReplicationFactorMetrics(

Review Comment:
   But maybe I think we need to do that here?



-- 
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]

Reply via email to