-
Notifications
You must be signed in to change notification settings - Fork 276
Description
Describe the bug
The BufferAccumulator class does backoff and retry to write and flush to the buffer. When the buffer is full or circuit breaker is open, the buffer will reject the writes and the buffer accumulator will backoff and retry infinitely.
However, when there is a shutdown command to Data Prepper, the BufferAccumulator will not stop backing off and retrying, which will lead to the threads using the BufferAccumulator to block and not exit, delaying the shutdown of the source (potentially for a long time if the buffer never empties or circuit breaker never recovers)
When circuit breaker opens, for example, this exception will get thrown (
Line 62 in ca1552e
| throw new TimeoutException("Circuit breaker is open. Unable to write to buffer."); |
Line 90 in ca1552e
| LOG.debug("Timed out retrying buffer accumulator"); |
To Reproduce
Steps to reproduce the behavior:
- Configure a low circuit breaker threshold in the data-prepper-config.yaml
- Start a pipeline that uses buffer accumulator
- Make sure circuit breaker is open.
- Call shutdown and see that Data Prepper does not exit until the source forces shutdown on the threads (if the source does so)
Expected behavior
A clear and concise description of what you expected to happen.
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
Labels
Type
Projects
Status