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

[FIXED] Pull requests: don't send 408 when request expires #2482

Merged
merged 2 commits into from
Sep 2, 2021

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented Sep 1, 2021

When expiring requests, the server would send 408 if interest was
still present, which can happen for pull subscribe implementations
that maintain interest for the duration of the pull subscription.

Let's keep the 408 for when a request is "force expired", that
is, a request was removed from the queue because it queue was
full but interest is still found.

Signed-off-by: Ivan Kozlovic [email protected]

When expiring requests, the server would send 408 if interest was
still present, which can happen for pull subscribe implementations
that maintain interest for the duration of the pull subscription.

Let's keep the 408 for when a request is "force expired", that
is, a request was removed from the queue because it queue was
full but interest is still found.

Signed-off-by: Ivan Kozlovic <[email protected]>
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Might bump one sleep.

server/jetstream_test.go Outdated Show resolved Hide resolved
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ripienaar
Copy link
Contributor

Very glad to see this removed LGTM

@kozlovic
Copy link
Member Author

kozlovic commented Sep 2, 2021

@ripienaar It is still sent (as of now) if the request is "force expired", that is, the server could not remove (due to expiration) a single request and therefore evicts the first from the queue. In that case, if there is interest, server will still send 408, which I would argue is wrong "status/description", since in this case it is not a timeout but an eviction or some other error, but that would definitively break clients if we introduce a new code there.

@kozlovic kozlovic merged commit cd258e7 into main Sep 2, 2021
@kozlovic kozlovic deleted the js_expire_pull_reqs branch September 2, 2021 15:02
@ripienaar
Copy link
Contributor

Yes, my moan about them was the ones that came at some random future time and not at the point of expiration timer expiring (the lazy ones). So happy to see those specific ones go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants