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

PMM-13141 Added feature compatibility version collector #863

Merged

Conversation

cfsalguero
Copy link
Contributor

@cfsalguero cfsalguero commented Jun 17, 2024

PMM-13141(https://jira.percona.com/browse/PMM-13141

Added a new collector for Feature compatibility version,

@cfsalguero cfsalguero requested a review from a team as a code owner June 17, 2024 17:48
@cfsalguero cfsalguero requested review from BupycHuk and JiriCtvrtka and removed request for a team June 17, 2024 17:48
Copy link
Member

@BupycHuk BupycHuk left a comment

Choose a reason for hiding this comment

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

LGTM, just few comments

@@ -70,6 +70,9 @@ type Opts struct {
EnableCollStats bool
EnableProfile bool
EnableShards bool
EnableFCV bool // Feature Compatibility Version.

FCVInterval time.Duration
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if we need separate interval for FCV.

Copy link
Member

Choose a reason for hiding this comment

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

this value changes only after upgrades so it should have a big interval to avoid unnecessary reads

Copy link
Member

Choose a reason for hiding this comment

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

that's true, but it's not a good practice in exporter development. Is this operation generate a big load on system?

Copy link
Member

Choose a reason for hiding this comment

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

no, not really. We can use one of the default collection intervals


rawValue := walkTo(m, []string{"featureCompatibilityVersion", "version"})
if rawValue != nil {
version, err := strconv.ParseFloat(fmt.Sprintf("%v", rawValue), 64)
Copy link
Member

Choose a reason for hiding this comment

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

wouldn't it better to use hashicorps version library to parse it?

@BupycHuk BupycHuk requested a review from idoqo September 13, 2024 20:45
@BupycHuk BupycHuk merged commit 23502f1 into percona:main Sep 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants