[9.3](backport #51591) remove global paths from metricbeat#51779
Conversation
* remove global paths from metricbeat * x-pack/metricbeat/sql: migrate cursor tests off the global paths singleton --------- Co-authored-by: Orestis Floros <orestis.floros@elastic.co> (cherry picked from commit 37f3d26) # Conflicts: # metricbeat/mb/builders.go # x-pack/libbeat/cmd/instance/beat.go # x-pack/metricbeat/module/sql/module.go # x-pack/metricbeat/module/sql/module_test.go # x-pack/metricbeat/module/sql/query/cursor/store_test.go # x-pack/metricbeat/module/sql/query/cursor_integration_test.go # x-pack/metricbeat/module/sql/query/query_integration_test.go # x-pack/metricbeat/module/sql/query/query_test.go
|
Cherry-pick of 37f3d26 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 |
🤖 GitHub commentsJust comment with:
|
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
TL;DRBuildkite is failing because the backport commit Remediation
Investigation detailsRoot CauseThis is a backport conflict-resolution issue, not a transient infrastructure failure. The PR is labeled Evidence
VerificationI did not re-run the failing Buildkite commands locally because this checkout is at the original source commit What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
This comment has been minimized.
This comment has been minimized.
TL;DR
Remediation
Investigation detailsRoot CauseThis is a backport cleanup issue. PR The current PR file list does not include This is a follow-on from the previous PR Actions Detective report: the earlier run failed in Evidence
Validation
Follow-up
What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
Tick the box to add this pull request to the merge queue (same as
|
Proposed commit message
This change removes the use of global/singleton path state from Metricbeat and replaces it with per-instance paths, fixing a bug where multiple Metricbeat receivers could share the same data store.
Problem
Metricbeat was using global paths.Paths (a package-level singleton) when resolving file paths like the SQL cursor data store. In receiver mode, multiple Metricbeat instances share the same process, so they would all resolve to the same data path, causing them to share state incorrectly.
Changes
Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
None. Stand alone Metricbeat will function as before, only metricbeat receiver will have multiple beat instances in the same process. This change will allow the sql module to have unique data path per beat instance.
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
This is an automatic backport of pull request #51591 done by [Mergify](https://mergify.com).