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

refactor: replace custom atomic types with stdlib atomic #4963

Merged
merged 3 commits into from
Jun 20, 2024

Conversation

kruskall
Copy link
Member

What does this PR do?

Go 1.19 added new atomic types. Replace custom atomic implementation with native types.

Why is it important?

Add support for any upstream arch supported by the stdlib
Better use of race detector in tests
Less maintenance burden and simplify code
Fix race condition in runtime stop method (load+store is not atomic, replace with compareandswap)

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

How to test this PR locally

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

Go 1.19 added new atomic types. Replace custom atomic implementation with native types.
@kruskall kruskall added the enhancement New feature or request label Jun 19, 2024
@kruskall kruskall requested a review from a team as a code owner June 19, 2024 17:49
@kruskall kruskall requested review from michalpristas and faec June 19, 2024 17:49
Copy link
Contributor

mergify bot commented Jun 19, 2024

This pull request does not have a backport label. Could you fix it @kruskall? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 8./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@kruskall kruskall enabled auto-merge (squash) June 20, 2024 10:40
@kruskall kruskall merged commit 81e112d into elastic:main Jun 20, 2024
13 checks passed
@kruskall kruskall deleted the refactor/stdlib-atomic branch June 20, 2024 14:27
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.

2 participants