Skip to content

Remove legacy output concurrency#19003

Merged
andrewvc merged 9 commits into
mainfrom
remove-legacy-output-concurrency
May 15, 2026
Merged

Remove legacy output concurrency#19003
andrewvc merged 9 commits into
mainfrom
remove-legacy-output-concurrency

Conversation

@andrewvc

@andrewvc andrewvc commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Release notes

The default legacy output strategy is now removed. This should cause no user-facing issues.

What does this PR do?

Removes the legacy output strategy, which used the ancient and long deprecated multi-worker concurrency queue with a per-output queue / threadpool. See #18971 for more detail / analysis.

There is a small non-breaking change in behavior, now when users declare workers => 2 or greater values instead of an exception being thrown they only get a warning. This should not be considered a breaking change since this is something no one could rightly be imagined to depend on.

Why is it important/What is the impact to the user?

Code simplification / cleanup.

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 (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • Make sure that running with the workers setting produces no effect
  • Make sure that outputs with undeclared concurrency still work

How to test this PR locally

Confirm the commands / output below

#Try this as-is, and with workers => 1 and workers => 2
bin/logstash -e 'input { generator { count => 10 } } output { pipe { command => "tee teeout" } }'
# View the output
cat teeout 

Related issues

Fixes #18971

@andrewvc andrewvc added the bug label Apr 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
  • run exhaustive tests : Run the exhaustive tests Buildkite pipeline.

@mergify

mergify Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

This pull request does not have a backport label. Could you fix it @andrewvc? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit.
  • If no backport is necessary, please add the backport-skip label

@andrewvc andrewvc added the backport-skip Skip automated backport with mergify label Apr 15, 2026
@andrewvc andrewvc requested a review from kaisecheng April 15, 2026 19:08
@andrewvc andrewvc marked this pull request as ready for review April 15, 2026 19:08
Comment thread logstash-core/lib/logstash/outputs/base.rb Outdated
Comment thread logstash-core/lib/logstash/outputs/base.rb
Comment thread logstash-core/lib/logstash/outputs/base.rb Outdated
Comment thread logstash-core/lib/logstash/outputs/base.rb Outdated
it "should instantiate cleanly" do
params = { "dummy_option" => "potatoes", "codec" => "json", "workers" => 2 }
worker_params = params.dup; worker_params["workers"] = 1
params = { "dummy_option" => "potatoes", "codec" => "json" }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here's a bug that pre-existed your change: the params local variable is assigned but not used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Comment thread logstash-core/lib/logstash/config/mixin.rb Outdated
@andrewvc

Copy link
Copy Markdown
Contributor Author

@yaauie thanks for the review, I've incorporated all your fixes, should be ready for review again.

@kaisecheng

Copy link
Copy Markdown
Contributor

/run exhaustive tests

@kaisecheng

Copy link
Copy Markdown
Contributor

run exhaustive tests

@kaisecheng kaisecheng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The red CI is unrelated to this change

@yaauie yaauie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the general approach makes sense. I have a couple comments on finding a path forward that gives users more-meaningful info if/when they hit the issue.

Comment thread logstash-core/lib/logstash/outputs/base.rb Outdated
Comment thread logstash-core/lib/logstash/config/mixin.rb Outdated
andrewvc and others added 2 commits April 30, 2026 14:06
Add rye's suggestion for improved error message for legacy concurrency plugins

Co-authored-by: Rye Biesemeyer <yaauie@users.noreply.github.com>
Use inspect  in the corner case of missing `config_name`

Co-authored-by: Rye Biesemeyer <yaauie@users.noreply.github.com>
@andrewvc andrewvc merged commit 582ea88 into main May 15, 2026
10 of 11 checks passed
@andrewvc andrewvc deleted the remove-legacy-output-concurrency branch May 15, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-skip Skip automated backport with mergify bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove :legacy output strategy and change default Ruby output concurrency to :single

5 participants