-
Notifications
You must be signed in to change notification settings - Fork 538
Remove last remaining NewRegistry method call #18154
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
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
This pull request does not have a backport label. Could you fix it @faec? 🙏
|
|
Thanks! 🙇 older 9.x version don't have local registries so it's a bit more complicated to switch. Change LGTM! Can you sign your commits ? |
|
I see you have added it now |
a268b1d to
2254126
Compare
2254126 to
700e0cb
Compare
(cherry picked from commit 013ef6f)
(cherry picked from commit 013ef6f)
(cherry picked from commit 013ef6f) Co-authored-by: Fae Charlton <[email protected]>
(cherry picked from commit 013ef6f) Co-authored-by: Fae Charlton <[email protected]>
The
NewRegistrymethod inelastic-agent-libsis inherently unsafe, especially in concurrent code: callingNewRegistryon a name that already exists causes a panic, but checking whether the name exists first is not atomic. The recently addedGetOrCreateRegistrymethod is a safe alternative that checks the name's existence and initializes it atomically, and never panics. This PR removes the last remainingNewRegistrycall in the apm-server repo.Related issues
This is a precautionary followup to elastic/fleet-server#5170 and #17872, where a different
NewRegistrycall site caused a panic on server reload.