OneSizeFitsQuorum commented on code in PR #11287:
URL: https://github.com/apache/iotdb/pull/11287#discussion_r1356424404
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionMetrics.java:
##########
@@ -274,23 +326,11 @@ public static void bindDatabasePartitionMetrics(
database,
Tag.TYPE.toString(),
TConsensusGroupType.DataRegion.toString());
+ bindDatabaseReplicationFactorMetrics(
Review Comment:
If put this line in it, we should revise the function
bindDatabasePartitionMetricsWhenUpdate name?
##########
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:
If changing the number of replica isn't currently supported, maybe we
shouldn't do it 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]