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

Loop on error Cannot convert reply - redigo: nil returned #619

Open
tdeverdiere opened this issue Oct 1, 2024 · 1 comment
Open

Loop on error Cannot convert reply - redigo: nil returned #619

tdeverdiere opened this issue Oct 1, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@tdeverdiere
Copy link
Contributor

tdeverdiere commented Oct 1, 2024

Describe the bug
The redis stream can be trimmed using option MAXLEN on XADD command.
If a pending entry does not exist anymore in the stream the receiver adapter keeps looping on ID=0, and it never acknowledges the entry. So the stream consumer reads indefinitly in the same entry.

The fact that a pending entry is not in the stream anymore is not easy to reproduce and this case does not happen frequently.
But here restarting the receiver adapter does not solve the problem be cause consumer reads indefinitly the same pending entry.

Expected behavior
I would acknowledged the entry if redigo return 'nil returned'. Or i would add an option to allow it.

To Reproduce

  1. Add an entry into a Redis stream so the receiver adapter reads the entry but does not acknowledge it.
  2. Stop Redis
  3. Restart Redis
  4. Receiver adapter stays in a permanent error loop described here
  5. Execute XADD ... MAXLEN = 1 to limit the stream to 1. So the pending entry is not anymore in the stream
  6. Restart receiver adapter

Knative release version
1.15

Additional context
That is not a big problem if we fixed #387
And the stream could be cleaned by another service.

I would like to explore solutions, but how would i build the project and create a docker image for the receiver adapter? That would help me a lot. I should follow the getting started here: https://knative.dev/docs/getting-started ?

@tdeverdiere tdeverdiere added the kind/bug Categorizes issue or PR as related to a bug. label Oct 1, 2024
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

1 participant