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

in_emitter: added automatic threading detection workaround #7450

Conversation

leonardo-albertovich
Copy link
Collaborator

This patch uses the scheduler instance from the thread local storage to determine if the filter creating the emitter instance is running in an input plugins thread to transparently switch over to the ring buffer based mechanism.

This is not a definitive solution, it's a workaround.

@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 20, 2023 17:44 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 20, 2023 17:44 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 20, 2023 17:44 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 20, 2023 18:08 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 20, 2023 18:13 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 20, 2023 18:13 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 20, 2023 18:13 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 20, 2023 18:31 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 20, 2023 18:31 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 20, 2023 18:31 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 20, 2023 18:54 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 09:31 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 09:31 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 09:31 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 09:52 — with GitHub Actions Inactive
This patch uses the scheduler instance from the thread local storage
to determine if the filter creating the emitter instance is running
in an input plugins thread to transparently switch over to the ring
buffer based mechanism.

This is not a definitive solution, it's a workaround.

Signed-off-by: Leonardo Alminana <[email protected]>
@leonardo-albertovich leonardo-albertovich force-pushed the leonardo-master-processor-emitter-thread-safety-workaround branch from a6955c2 to d697739 Compare May 21, 2023 09:59
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 10:00 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 10:00 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 10:00 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 10:24 — with GitHub Actions Inactive
Additionally, the unnecessary allocation was removed.

Signed-off-by: Leonardo Alminana <[email protected]>
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 10:30 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 10:30 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 10:30 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich temporarily deployed to pr May 21, 2023 10:53 — with GitHub Actions Inactive
@leonardo-albertovich leonardo-albertovich merged commit c254d0f into master May 21, 2023
@leonardo-albertovich leonardo-albertovich deleted the leonardo-master-processor-emitter-thread-safety-workaround branch May 21, 2023 11:37
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.

1 participant