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

Fix:SUBSCRIBE can't update last interaction time #335

Merged
merged 1 commit into from
Jul 20, 2021

Conversation

smartlee
Copy link
Contributor

Act like redis,SUBSCRIBE must update last interaction time while a publish message received, otherwise this channel may be closed for timeout reason by default.

Act like redis,SUBSCRIBE must update last interaction time while a publish message received, otherwise this channel may be closed for timeout reason by default.
@git-hulk git-hulk self-requested a review July 20, 2021 09:34
@git-hulk
Copy link
Member

good catch @smartlee

@git-hulk git-hulk merged commit 9a0bc14 into apache:unstable Jul 20, 2021
@git-hulk
Copy link
Member

@Mergifyio backport 1.3

mergify bot pushed a commit that referenced this pull request Jul 20, 2021
Act like Redis, SUBSCRIBE must update the last interaction time while a publish message received, otherwise, this channel may be closed for timeout reasons by default.

(cherry picked from commit 9a0bc14)
@mergify
Copy link

mergify bot commented Jul 20, 2021

Command backport 1.3: success

Backports have been created

git-hulk pushed a commit that referenced this pull request Jul 20, 2021
… (#336)

Act like Redis, SUBSCRIBE must update the last interaction time while a publish message received, otherwise, this channel may be closed for timeout reasons by default.

(cherry picked from commit 9a0bc14)

Co-authored-by: BradLee <entropylee@gmail.com>
@ShooterIT
Copy link
Member

@git-hulk Although there is a problem, i don't think it is right way to fix, because we just add reply to libevent buffer instead of writing to clients successfully, clients may not read anythings after sending subscribe some channels, so we never kill these clients since of timeout. This commit may plant a new bug.

@git-hulk
Copy link
Member

so Redis updates the last interaction time after writing to the client socket buffer?

@ShooterIT
Copy link
Member

yep

@git-hulk
Copy link
Member

seems we didn't have a fast way to do that, any advice to workaround?

@ShooterIT
Copy link
Member

Yes, there is no a easy way, maybe enable libevent write event and set appropriate water level

@git-hulk
Copy link
Member

okay

ShooterIT pushed a commit to ShooterIT/kvrocks that referenced this pull request Sep 10, 2021
…che#335)

Act like Redis, SUBSCRIBE must update the last interaction time while a publish message received, otherwise, this channel may be closed for timeout reasons by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants