[8.19] (backport #19036) dead_letter_queue.flush_check_interval new config for flushing staled segment files.#19088
[8.19] (backport #19036) dead_letter_queue.flush_check_interval new config for flushing staled segment files.#19088mergify[bot] wants to merge 3 commits into
dead_letter_queue.flush_check_interval new config for flushing staled segment files.#19088Conversation
…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) # Conflicts: # docs/reference/dead-letter-queues.md # logstash-core/lib/logstash/environment.rb # logstash-core/src/main/java/org/logstash/execution/AbstractPipelineExt.java # logstash-core/src/test/java/org/logstash/common/io/DeadLetterQueueWriterTest.java
|
Cherry-pick of f2f0d3f has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
🤖 GitHub commentsJust comment with:
|
|
This needs a work to convert docs MD to ascii format. |
💚 Build Succeeded
History
cc @mashhurs |
|
@andsel I have backported to see how complex the backport will be. And 8.19 is the last 8.x we have but with more releases. I am not really sure the commitment to include in the 8.19. It looks to me nice to have. |
|
Technically this is a feature, so shouldn't be backported. However, we can keep this if someone request it or merge once the feature proove for stability on 9.x releases. |
Makes sense, I will keep in mind. Thank you! |
|
This pull request has not been merged yet. Could you please review and merge it @mashhurs? 🙏 |
1 similar comment
|
This pull request has not been merged yet. Could you please review and merge it @mashhurs? 🙏 |
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).