-
Notifications
You must be signed in to change notification settings - Fork 5k
[8.x](backport #40132) feat: replace custom atomic with sync/atomic #41979
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
* feat: replace custom atomic with sync/atomic Go 1.19 added new atomic types. Replace custom atomic types with stdlib atomic package to fully use the race detector, improved lsp hints and support. Use pointers in sniffer struct to prevent copying the atomic struct and cause a race condition. * lint: time.Now().Sub -> time.Since fix golangci-lint issue * Apply suggestions from code review Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co> * refactor: keep Swap usage as is * lint: avoid unnecessary conversion fix golangci-lint issue * fix: update method reference to new atomic types * fix: resolve more compile errors and test failures * lint: fix linter issues * lint: fix linter issues * lint: fix linter issues * lint: fix linter issues * lint: more linting errors * lint: fix linter issues * lint: remove unused import * lint: fix linter issue * lint: fix linter issues * lint: fix linter issues --------- Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co> (cherry picked from commit 296b83b) # Conflicts: # filebeat/inputsource/common/streaming/listener.go
|
Cherry-pick of 296b83b has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
|
This pull request doesn't have a |
|
This pull request has not been merged yet. Could you please review and merge it @kruskall? 🙏 |
1 similar comment
|
This pull request has not been merged yet. Could you please review and merge it @kruskall? 🙏 |
Proposed commit message
Go 1.19 added new atomic types. Replace custom atomic types with stdlib atomic package to fully use the race detector, improved lsp hints and support.
Use pointers in sniffer struct to prevent copying the atomic struct and cause a race condition.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
This is an automatic backport of pull request #40132 done by [Mergify](https://mergify.com).