OneSizeFitsQuorum commented on code in PR #14506:
URL: https://github.com/apache/iotdb/pull/14506#discussion_r1895342721
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/metrics/file/TsFileMetrics.java:
##########
@@ -206,17 +206,19 @@ public Gauge getOrCreateGlobalTsFileCountGauge(
}
public void deleteGlobalTsFileCountGauge(String orderStr, String database,
String regionId) {
- metricService
- .get()
- .remove(
- MetricType.GAUGE,
- FILE_GLOBAL_COUNT,
- Tag.NAME.toString(),
- orderStr,
- Tag.DATABASE.toString(),
- database,
- Tag.REGION.toString(),
- regionId);
+ AbstractMetricService metricService = this.metricService.get();
+ if (metricService == null) {
Review Comment:
use optional?
--
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]