Skip to content

[To rel/0.13][IOTDB-3969]Fix timeseries statistic bug#6808

Merged
HTHou merged 4 commits intoapache:rel/0.13from
MarcosZyk:timeseries_statistic_for_template
Jul 28, 2022
Merged

[To rel/0.13][IOTDB-3969]Fix timeseries statistic bug#6808
HTHou merged 4 commits intoapache:rel/0.13from
MarcosZyk:timeseries_statistic_for_template

Conversation

@MarcosZyk
Copy link
Copy Markdown
Contributor

@MarcosZyk MarcosZyk commented Jul 27, 2022

Description

Problem

When delete storage group, the timeseries represent by template will be counted and the result will be used to update the timeseries statistic number. The number doesn't update when activate template. Thus the number will be negative.

Solution

Use two number to statistic template series and normal series separately.

@MarcosZyk MarcosZyk marked this pull request as ready for review July 27, 2022 11:55
@MarcosZyk MarcosZyk changed the title [IOTDB-3969]Fix timeseries statistic bug [To rel/0.13][IOTDB-3969]Fix timeseries statistic bug Jul 27, 2022
Copy link
Copy Markdown
Contributor

@bigreybear bigreybear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

Copy link
Copy Markdown
Contributor

@SpriCoder SpriCoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL~

Comment on lines +321 to +337
.getOrCreateAutoGauge(
Metric.QUANTITY.toString(),
MetricLevel.IMPORTANT,
totalSeriesNumber,
totalNormalSeriesNumber,
AtomicLong::get,
Tag.NAME.toString(),
"timeSeries");
"normal-timeSeries");

MetricsService.getInstance()
.getMetricManager()
.getOrCreateAutoGauge(
Metric.QUANTITY.toString(),
MetricLevel.IMPORTANT,
totalTemplateSeriesNumber,
AtomicLong::get,
Tag.NAME.toString(),
"template-timeSeries");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my perspective, I think these two metrics can use type tag to distinguish.
For example, TAG.NAME.toString(), "timeSeries", TAG.TYPE.toString(), "normal/template"
Besides, please update Metric doc at the same time:

  1. docs/UserGuide/Maintenance-Tools/Metric-Tool.md
  2. docs/zh/UserGuide/Maintenance-Tools/Metric-Tool.md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Copy Markdown
Contributor

@SpriCoder SpriCoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants