[9.4] (backport #19036) dead_letter_queue.flush_check_interval new config for flushing staled segment files.#19090
Merged
Merged
Conversation
…ed segment files. (#19036) * Validates to be min 1s to keep consistency with the docs. Introduces new config for flushing staled segment files. * Add pipeline name to the DLQ flush thread name for better visibility in the threads API results. Add suggestions from the docs review. Re-organize the duration clam logic in a way for better maintainable and fix the unit tests. * Update logstash-core/src/main/java/org/logstash/common/io/DeadLetterQueueWriter.java Remove unused method. Co-authored-by: Andrea Selva <selva.andre@gmail.com> * Move the flush chech interval to the DeadLetterQueueWriter.Builder. Remove confusing scheduler from the docs explanations. unit tests for the only newly introduced conditions. * Apply suggestions from code review Doc consistency and test rename suggestions accepted. Co-authored-by: Andrea Selva <selva.andre@gmail.com> * Keep the interval type as a Duration, rename and simplify test suites. --------- Co-authored-by: Andrea Selva <selva.andre@gmail.com> (cherry picked from commit f2f0d3f)
Contributor
🤖 GitHub commentsJust comment with:
|
5 tasks
Contributor
🔍 Preview links for changed docs |
Contributor
✅ Vale Linting ResultsNo issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
💚 Build Succeeded
cc @mashhurs |
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.
Release notes
Introduces new
dead_letter_queue.flush_check_intervalconfig for flushing the staled segment files scheduler which can reduce frequent check overhead.What does this PR do?
dead_letter_queue.flush_check_intervalparam for the segment file stale check scheduler. See the problem description - Introduce a period for file flushing staled segment files #19037dead_letter_queue.flush_intervaldead_letter_queue.flush_intervalfor min 1s to keep consistency with the docs - https://www.elastic.co/docs/reference/logstash/dead-letter-queues: "Note that this value cannot be set to lower than 1000ms."High level results
5-pipelines runs with 1-worker (to get comparable output), their configurations:
flush_interval: 5000andflush_check_interval: 1000flush_interval: 5000andflush_check_interval: 2000flush_interval: 5000andflush_check_interval: 5000flush_interval: 10000andflush_check_interval: 5000flush_interval: 10000andflush_check_interval: 7000Following is the result table which shows the efficiency:
Why is it important/What is the impact to the user?
The users who are using intensive DLQ operations (write/read), the frequent flush check scheduler might give overhead to the pipeline, means uses much CPU. Introducing configurable scheduler cadence improves the pipeline efficiency by removing frequent operations.
Checklist
Author's Checklist
How to test this PR locally
flush_intervalandflush_check_intervalparams, below is the example.ES configured in
config/tests/elasticsearch-output.confneeds to reject events either 400 or 404 to be routed to the DLQ. Used the following config:Related issues
Use cases
Screenshots
Logs
This is an automatic backport of pull request #19036 done by [Mergify](https://mergify.com).