Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Measurement Cardinality < 0 #23285

Open
gwossum opened this issue Apr 20, 2022 · 0 comments
Open

Measurement Cardinality < 0 #23285

gwossum opened this issue Apr 20, 2022 · 0 comments
Assignees
Labels

Comments

@gwossum
Copy link
Member

gwossum commented Apr 20, 2022

Under some circumstances, measurement cardinality (as shown in debug vars) can be less than 0. This does not appear to indicate an underlying issue, rather that of two estimates being used to calculate the number (estimate(measurements) - estimate(tombstones)). If these two measurements are close to each other, you could end up with a negative number. Result should be clamped to avoid wacky answers like negative numbers.

@gwossum gwossum added the 1.x label Apr 20, 2022
@gwossum gwossum self-assigned this Apr 20, 2022
gwossum added a commit that referenced this issue Apr 20, 2022
Clamp the value of Store.MeasurementsCardinality so that it can not be less
than 0. This primarily shows up as a negative `numMeasurements` value in
/debug/vars under some circumstances.

refs #23285
gwossum added a commit that referenced this issue Apr 21, 2022
Clamp the value of Store.MeasurementsCardinality so that it can not be less
than 0. This primarily shows up as a negative `numMeasurements` value in
/debug/vars under some circumstances.

refs #23285
gwossum added a commit that referenced this issue Apr 21, 2022
Clamp the value of Store.MeasurementsCardinality so that it can not be less
than 0. This primarily shows up as a negative `numMeasurements` value in
/debug/vars under some circumstances.

refs #23285

(cherry picked from commit 160cf67)
gwossum added a commit that referenced this issue Apr 26, 2022
Clamp the value of Store.MeasurementsCardinality so that it can not be less
than 0. This primarily shows up as a negative numMeasurements value in
/debug/vars under some circumstances.

refs #23285

(cherry picked from commit 160cf67)
gwossum added a commit that referenced this issue Apr 27, 2022
Clamp the value of Store.MeasurementsCardinality so that it can not be less
than 0. This primarily shows up as a negative numMeasurements value in
/debug/vars under some circumstances.

refs #23285

(cherry picked from commit 160cf67)
gwossum added a commit that referenced this issue May 18, 2022
* fix: MeasurementsCardinality should not be less than 0 (#23286)

Clamp the value of Store.MeasurementsCardinality so that it can not be less
than 0. This primarily shows up as a negative `numMeasurements` value in
/debug/vars under some circumstances.

refs #23285

(cherry picked from commit 160cf67)
chengshiwen pushed a commit to chengshiwen/influxdb that referenced this issue Aug 11, 2024
)

Clamp the value of Store.MeasurementsCardinality so that it can not be less
than 0. This primarily shows up as a negative `numMeasurements` value in
/debug/vars under some circumstances.

refs influxdata#23285
chengshiwen pushed a commit to chengshiwen/influxdb that referenced this issue Aug 27, 2024
)

Clamp the value of Store.MeasurementsCardinality so that it can not be less
than 0. This primarily shows up as a negative `numMeasurements` value in
/debug/vars under some circumstances.

refs influxdata#23285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant