You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "SpriCoder (via GitHub)" <gi...@apache.org> on 2023/10/11 17:00:08 UTC
[PR] Fix potential loss of metrics when restart confignode [iotdb]
SpriCoder opened a new pull request, #11287:
URL: https://github.com/apache/iotdb/pull/11287
1. Move add metrics from init to leader ready
2. Move the management of replication factor metric into PartitionMetrics
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix potential loss of metrics when restart confignode [iotdb]
Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix potential loss of metrics when restart confignode [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #11287:
URL: https://github.com/apache/iotdb/pull/11287#issuecomment-1759457808
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=11287)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix potential loss of metrics when restart confignode [iotdb]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #11287:
URL: https://github.com/apache/iotdb/pull/11287#issuecomment-1758212699
## [Codecov](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#11287](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (81b4cc9) into [master](https://app.codecov.io/gh/apache/iotdb/commit/8951eb8ce045604914c38e261b03de503fd9916c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (8951eb8) will **decrease** coverage by `0.02%`.
> Report is 1 commits behind head on master.
> The diff coverage is `47.32%`.
```diff
@@ Coverage Diff @@
## master #11287 +/- ##
============================================
- Coverage 48.56% 48.54% -0.02%
+ Complexity 24173 24162 -11
============================================
Files 2798 2799 +1
Lines 171208 171143 -65
Branches 20456 20440 -16
============================================
- Hits 83140 83075 -65
Misses 88068 88068
```
| [Files](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...ompaction/execute/task/AbstractCompactionTask.java](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL2NvbXBhY3Rpb24vZXhlY3V0ZS90YXNrL0Fic3RyYWN0Q29tcGFjdGlvblRhc2suamF2YQ==) | `67.74% <100.00%> (-1.75%)` | :arrow_down: |
| [...paction/execute/task/CrossSpaceCompactionTask.java](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL2NvbXBhY3Rpb24vZXhlY3V0ZS90YXNrL0Nyb3NzU3BhY2VDb21wYWN0aW9uVGFzay5qYXZh) | `85.51% <100.00%> (-0.20%)` | :arrow_down: |
| [...paction/execute/task/InnerSpaceCompactionTask.java](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL2NvbXBhY3Rpb24vZXhlY3V0ZS90YXNrL0lubmVyU3BhY2VDb21wYWN0aW9uVGFzay5qYXZh) | `84.93% <100.00%> (+5.22%)` | :arrow_up: |
| [...egion/compaction/schedule/CompactionScheduler.java](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL2NvbXBhY3Rpb24vc2NoZWR1bGUvQ29tcGFjdGlvblNjaGVkdWxlci5qYXZh) | `93.93% <ø> (ø)` | |
| [...ion/compaction/schedule/CompactionTaskManager.java](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL2NvbXBhY3Rpb24vc2NoZWR1bGUvQ29tcGFjdGlvblRhc2tNYW5hZ2VyLmphdmE=) | `72.93% <ø> (+0.99%)` | :arrow_up: |
| [...on/selector/impl/SizeTieredCompactionSelector.java](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL2NvbXBhY3Rpb24vc2VsZWN0b3IvaW1wbC9TaXplVGllcmVkQ29tcGFjdGlvblNlbGVjdG9yLmphdmE=) | `95.83% <ø> (ø)` | |
| [...region/compaction/settle/SettleRequestHandler.java](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL2NvbXBhY3Rpb24vc2V0dGxlL1NldHRsZVJlcXVlc3RIYW5kbGVyLmphdmE=) | `64.92% <ø> (ø)` | |
| [...torageengine/dataregion/tsfile/TsFileResource.java](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9kYXRhcmVnaW9uL3RzZmlsZS9Uc0ZpbGVSZXNvdXJjZS5qYXZh) | `65.34% <ø> (-0.55%)` | :arrow_down: |
| [...tdb/db/storageengine/rescon/memory/SystemInfo.java](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvc3RvcmFnZWVuZ2luZS9yZXNjb24vbWVtb3J5L1N5c3RlbUluZm8uamF2YQ==) | `60.54% <100.00%> (+1.71%)` | :arrow_up: |
| [...nsensus/statemachine/ConfigRegionStateMachine.java](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9jb25maWdub2RlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9pb3RkYi9jb25maWdub2RlL2NvbnNlbnN1cy9zdGF0ZW1hY2hpbmUvQ29uZmlnUmVnaW9uU3RhdGVNYWNoaW5lLmphdmE=) | `0.00% <0.00%> (ø)` | |
| ... and [5 more](https://app.codecov.io/gh/apache/iotdb/pull/11287?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
... and [21 files with indirect coverage changes](https://app.codecov.io/gh/apache/iotdb/pull/11287/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix potential loss of metrics when restart confignode [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #11287:
URL: https://github.com/apache/iotdb/pull/11287#issuecomment-1758137080
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=11287)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix potential loss of metrics when restart confignode [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #11287:
URL: https://github.com/apache/iotdb/pull/11287#issuecomment-1759171645
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=11287)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix potential loss of metrics when restart confignode [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #11287:
URL: https://github.com/apache/iotdb/pull/11287#issuecomment-1759112352
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=11287)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix potential loss of metrics when restart confignode [iotdb]
Posted by "SpriCoder (via GitHub)" <gi...@apache.org>.
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix potential loss of metrics when restart confignode [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #11287:
URL: https://github.com/apache/iotdb/pull/11287#issuecomment-1759241306
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=11287)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix potential loss of metrics when restart confignode [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #11287:
URL: https://github.com/apache/iotdb/pull/11287#issuecomment-1758874063
SonarCloud Quality Gate failed. [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=11287)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_iotdb&pullRequest=11287&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL) [1 Code Smell](https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=11287&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=11287&metric=new_duplicated_lines_density&view=list)
 Catch issues before they fail your Quality Gate with our IDE extension  [SonarLint](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=sonarcloud-welcome)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix potential loss of metrics when restart confignode [iotdb]
Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum merged PR #11287:
URL: https://github.com/apache/iotdb/pull/11287
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org