Support setting timeout on delete/update/patch stream API

Open
#1,938 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go, kafka

Research direction

Start by tracing the delete, update, and patch stream API entry points and their existing graceful-shutdown path. Verify how a timeout query parameter should affect blocked streams, then confirm that all three operations force deletion after the timeout while preserving current behavior when it is absent.

Written by the indexing model from the issue text.

Description

annoying enhancement ux

Benthos streams mode provdes API to delete a stream. With current implementation, the API tries to shutdown the stream gracefully. However, it's possible that a stream is blocked. For example, the kafka and kafka_franz outputs, if a bad broker address is used, those outputs will keep retrying the connection error (for kafka, it retries in Connect, while kafka_franz retries in BatchWrite). In such case, the delete stream API will be blocked and the stream will never be deleted.

To overcome this problem, one solution is to add a timeout query parameter to the delete stream API, e.g. DELETE /streams/{id}?timeout=<duration>. If the timeout query is provided, the API will force deleting the stream without waiting any longer. If it's not provided, the API will behave as it does today.

Since update/patch stream API also delete streams, this change should also apply to them as well.

Dominant language
Go
Stars
8.8k
Forks
969
Avg merge
1d 13h
Merged PRs (30d)
64

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from redpanda-data/connect

All issues in redpanda-data/connect

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.