8000 Automated cherry pick of #7230: Fix race condition when getting metrics by antoninbas · Pull Request #7236 · antrea-io/antrea · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Automated cherry pick of #7230: Fix race condition when getting metrics #7236

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

Conversation

antoninbas
Copy link
Contributor

Cherry pick of #7230 on release-2.2.

#7230: Fix race condition when getting metrics

For details on the cherry pick process, see the cherry pick requests page.

@antoninbas antoninbas added the kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release label Jun 19, 2025
metrics := querier.Metrics{
NumRecordsExported: fa.numRecordsExported.Load(),
NumRecordsReceived: fa.collectingProcess.GetNumRecordsReceived(),
NumFlows: fa.getNumFlows(),
Copy link
Member

Choose a reason for hiding this comment

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

there is a compiling error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed, thanks

The 2 int64 counters (numRecordsExported and numRecordsDropped) are
changed to atomic.Int64.
Access to the exporter pointers is protected by a mutex. It need to be
locked in UpdateOptions and GetRecordMetrics).

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
@antoninbas antoninbas force-pushed the automated-cherry-pick-of-#7230-upstream-release-2.2 branch from 60ed2d2 to 20c9a00 Compare June 19, 2025 04:07
@antoninbas
Copy link
Contributor Author

/test-all

@antoninbas antoninbas requested a review from tnqn June 20, 2025 22:09
@antoninbas antoninbas merged commit b9ccca9 into antrea-io:release-2.2 Jun 24, 2025
56 of 59 checks passed
@antoninbas antoninbas deleted the automated-cherry-pick-of-#7230-upstream-release-2.2 branch June 24, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0