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

DLQ - properly shutdown the flusher scheduled service used by DLQ writer #15962

Closed
andsel opened this issue Feb 21, 2024 · 0 comments · Fixed by #15964
Closed

DLQ - properly shutdown the flusher scheduled service used by DLQ writer #15962

andsel opened this issue Feb 21, 2024 · 0 comments · Fixed by #15964
Assignees

Comments

@andsel
Copy link
Contributor

andsel commented Feb 21, 2024

Add shutdown to SchedulerService and invoke in DLQ writer close operation.

Adding a clean shutdown of the service used to flush the DLQ segments, during test avoid printing to stdout errors like:

org.logstash.config.ir.compiler.DatasetCompilerTest > compilesOutputDataset STANDARD_OUT
    [WARN ] 2024-02-21 12:46:44.723 [dlq-flush-check] DeadLetterQueueWriter - Unable to finalize segment
    java.nio.file.NoSuchFileException: /var/folders/f2/6ln9srr13hsdp3kwfz68w3940000gn/T/junit3045222654236224377/junit12477847196935554659/2.log.tmp -> /var/folders/f2/6ln9srr13hsdp3kwfz68w3940000gn/T/junit3045222654236224377/junit12477847196935554659/2.log
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) ~[?:?]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) ~[?:?]
        at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:416) ~[?:?]
        at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:266) ~[?:?]
        at java.nio.file.Files.move(Files.java:1432) ~[?:?]
        at org.logstash.common.io.DeadLetterQueueWriter.sealSegment(DeadLetterQueueWriter.java:586) ~[main/:?]
        at org.logstash.common.io.DeadLetterQueueWriter.finalizeSegment(DeadLetterQueueWriter.java:572) ~[main/:?]
        at org.logstash.common.io.DeadLetterQueueWriter.scheduledFlushCheck(DeadLetterQueueWriter.java:543) ~[main/:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:840) [?:?]

org.logstash.config.ir.compiler.DatasetCompilerTest > compilesOutputDataset PASSED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant