Skip to content

[BUG] Getting timeout on graceful Shutdown in kinesis source. #5895

@sivagnanam-arumugam

Description

@sivagnanam-arumugam

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:

  1. Start the data prepper
  2. initiate graceful shutdown
  3. Check the kinesis source shutdown log

Expected behavior

  1. Timeout exception should not come.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Unplanned

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions