opensearch-project / opensearch-project/data-prepper
[BUG] Getting timeout on graceful Shutdown in kinesis source.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 374
- Forks
- 355
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
Describe the bug
When graceful shutdown is called.
Kinesis source shutdown is getting timeout and proceeding with force shutdown.
To Reproduce
Steps to reproduce the behavior:
- Start the data prepper
- initiate graceful shutdown
- Check the kinesis source shutdown log
Expected behavior
- Timeout exception should not come.
- Can the GRACEFUL_SHUTDOWN_WAIT_INTERVAL_SECONDS be configurable?
2025-07-18T15:55:58,854 [Thread-1] ERROR org.opensearch.dataprepper.plugins.kinesis.source.KinesisService
- Exception while executing kinesis consumer graceful shutdown, doing force shutdown
java.util.concurrent.TimeoutException: null at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1892)
~[?:?] at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2027) ~[?:?] at
org.opensearch.dataprepper.plugins.kinesis.source.KinesisService.shutDown(KinesisService.java:144)
~[kinesis-source-2.12.0-SNAPSHOT.jar:?] at org.opensearch.dataprepper.plugins.kinesis.source.KinesisSource.stop(KinesisSource.java:69)
~[kinesis-source-2.12.0-SNAPSHOT.jar:?] at org.opensearch.dataprepper.core.pipeline.Pipeline.shutdown(Pipeline.java:304)
~[data-prepper-core-2.12.0-SNAPSHOT.jar:?] at org.opensearch.dataprepper.core.DataPrepper.shutdownPipelines(DataPrepper.java:121)
~[data-prepper-core-2.12.0-SNAPSHOT.jar:?] at org.opensearch.dataprepper.core.DataPrepper.shutdownPipelines(DataPrepper.java:106)
~[data-prepper-core-2.12.0-SNAPSHOT.jar:?] at org.opensearch.dataprepper.core.DataPrepper.shutdown(DataPrepper.java:101)
~[data-prepper-core-2.12.0-SNAPSHOT.jar:?] at org.opensearch.dataprepper.DataPrepperExecute.lambda<span>main</span>0(DataPrepperExecute.java:45)
~[data-prepper-main-2.12.0-SNAPSHOT.jar:2.12.0-SNAPSHOT] at java.base/java.lang.Thread.run(Thread.java:829) [?:?]
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: [e.g. Ubuntu 20.04 LTS]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the shutdown path shown in plugins/kinesis-source, especially KinesisService.shutDown at line 144 and KinesisSource.stop at line 69. Reproduce the graceful shutdown timeout, then trace how GRACEFUL_SHUTDOWN_WAIT_INTERVAL_SECONDS is used. Done means graceful shutdown no longer emits the timeout exception and the wait interval is configurable as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, java
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100