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

Don't safe-wrap processors that don't have Close #34871

Merged
merged 2 commits into from Mar 21, 2023

Conversation

rdner
Copy link
Member

@rdner rdner commented Mar 21, 2023

What does this PR do?

This will make the wrapping more efficient and will reduce unnecessary overhead.
It's a follow up to #34647

Why is it important?

To maintain better performance of the processing pipeline.

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.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

The change is covered with a unit test.

Related issues

This will make the wrapping more efficient and will reduce unnecessary overhead.
@rdner rdner added enhancement Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team backport-v7.17.0 Automated backport with mergify backport-v8.6.0 Automated backport with mergify backport-v8.7.0 Automated backport with mergify labels Mar 21, 2023
@rdner rdner self-assigned this Mar 21, 2023
@rdner rdner requested a review from a team as a code owner March 21, 2023 14:50
@rdner rdner requested review from fearful-symmetry and leehinman and removed request for a team March 21, 2023 14:50
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 21, 2023
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 21, 2023
@jlind23
Copy link
Collaborator

jlind23 commented Mar 21, 2023

@rdner @cmacknz do we really want to backport this to 8.7?

@rdner
Copy link
Member Author

rdner commented Mar 21, 2023

@jlind23 yes, because the SafeProcessor wrapper was introduced with 8.7 (see the initial PR #34647) and has not been released yet. This PR makes some important improvements.

I'd strongly suggest we include it, so we minimise the performance hit.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Mar 21, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-03-21T15:06:47.771+0000

  • Duration: 69 min 36 sec

Test stats 🧪

Test Results
Failed 0
Passed 26029
Skipped 1968
Total 27997

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

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

@rdner rdner merged commit fe908d5 into elastic:main Mar 21, 2023
7 checks passed
@rdner rdner deleted the smarter-safe-wrap branch March 21, 2023 16:56
mergify bot pushed a commit that referenced this pull request Mar 21, 2023
This will make the wrapping more efficient and will reduce unnecessary overhead.

(cherry picked from commit fe908d5)
mergify bot pushed a commit that referenced this pull request Mar 21, 2023
This will make the wrapping more efficient and will reduce unnecessary overhead.

(cherry picked from commit fe908d5)
mergify bot pushed a commit that referenced this pull request Mar 21, 2023
This will make the wrapping more efficient and will reduce unnecessary overhead.

(cherry picked from commit fe908d5)

# Conflicts:
#	libbeat/processors/safe_processor_test.go
rdner added a commit that referenced this pull request Mar 21, 2023
This will make the wrapping more efficient and will reduce unnecessary overhead.

(cherry picked from commit fe908d5)

Co-authored-by: Denis <denis.rechkunov@elastic.co>
rdner added a commit that referenced this pull request Mar 21, 2023
This will make the wrapping more efficient and will reduce unnecessary overhead.

(cherry picked from commit fe908d5)

Co-authored-by: Denis <denis.rechkunov@elastic.co>
rdner added a commit that referenced this pull request Mar 21, 2023
…lose` (#34878)

* Don't safe-wrap processors that don't have `Close` (#34871)

This will make the wrapping more efficient and will reduce unnecessary overhead.

(cherry picked from commit fe908d5)

# Conflicts:
#	libbeat/processors/safe_processor_test.go

* Resolve conflicts

* Remove left-over from the conflict resolution

---------

Co-authored-by: Denis <denis.rechkunov@elastic.co>
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
This will make the wrapping more efficient and will reduce unnecessary overhead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.17.0 Automated backport with mergify backport-v8.6.0 Automated backport with mergify backport-v8.7.0 Automated backport with mergify enhancement Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants