Configure range state management based on concurrency#1724
Merged
Conversation
duhminick
reviewed
Jun 13, 2025
| } | ||
| c.once.Do(func() { | ||
| if c.Concurrency > 0 { | ||
| if c.Concurrency > 1 { |
Contributor
There was a problem hiding this comment.
This makes sense to me, but looks unrelated to the PR description (?) Can you provide some rational in the description in case someone comes across this again?
Contributor
Author
There was a problem hiding this comment.
Yep. Updated the description. I'm fine with removing it from this PR as well.
Contributor
There was a problem hiding this comment.
I think it's fine to have now that you added it to the description 👍
Contributor
There was a problem hiding this comment.
I think it's ok. It's such a small change for a PR
the-mann
previously approved these changes
Jun 13, 2025
| [outputs] | ||
|
|
||
| [[outputs.cloudwatchlogs]] | ||
| concurrency = 10 |
Contributor
There was a problem hiding this comment.
why are we removing this?
Contributor
Author
There was a problem hiding this comment.
Removed it during testing and forgot to put it back. Added it back.
| ] | ||
| } | ||
| }, | ||
| "concurrency": 10, |
Paramadon
reviewed
Jun 13, 2025
the-mann
approved these changes
Jun 13, 2025
Paramadon
approved these changes
Jun 13, 2025
duhminick
approved these changes
Jun 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the issue
In the previous PR (#1718), the capacity was hardcoded to 1 by default to maintain existing behavior.
Description of changes
Updates translator to set the
max_persist_stateon the plugins to be 2x theconcurrencyfield. This gives enough head room for cases where the pushers are all sending chunks of the file that are all non-continuous. This should never happen, but themax_persist_stateis an upper limit and not an allocation. The merging logic should make it so that they are within the limit of the number of pushers and in most cases, all of the pushers won't be sending for the same file (if configured to tail multiple files)Tangential changes
concurrencyfield is > 1. Settingconcurrencyto 1 should not result in a shared publisher pool of 1.License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
Added unit tests. Ran manually with concurrency configured prior to the changes in #1723 to reduce the number of ranges being sent and saw the tracker collapsing ranges which showed the capacity was being enforced.
Requirements
Before commiting your code, please do the following steps.
make fmtandmake fmt-shmake lintIntegration Tests
To run integration tests against this PR, add the
ready for testinglabel.