Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Aug 14, 2025

The NewRegistry method in elastic-agent-libs is inherently unsafe, especially in concurrent code: calling NewRegistry on a name that already exists causes a panic, but checking whether the name exists first is not atomic. The recently added GetOrCreateRegistry method is a safe alternative that checks the name's existence and initializes it atomically, and never panics. This PR removes the last remaining NewRegistry call in the apm-server repo.

Related issues

This is a precautionary followup to elastic/fleet-server#5170 and #17872, where a different NewRegistry call site caused a panic on server reload.


This is an automatic backport of pull request #18154 done by Mergify.

@mergify mergify bot added the backport label Aug 14, 2025
@mergify mergify bot requested a review from a team as a code owner August 14, 2025 19:20
@mergify mergify bot assigned faec Aug 14, 2025
@github-actions
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

mergify bot added a commit that referenced this pull request Aug 14, 2025
@mergify mergify bot merged commit 25e76b0 into 9.1 Aug 14, 2025
23 checks passed
@mergify mergify bot deleted the mergify/bp/9.1/pr-18154 branch August 14, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants