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 sessions in Twin are not closed when endpoint is deactivated. #1910

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

marcschier
Copy link
Collaborator

@marcschier marcschier commented Nov 22, 2022

Looks like a regression, the keep alive is counted towards the session's activity state, and any cleanup of it through the collector timer is not happening while keepalive's are being sent (constantly) because the timeout value (1 minute) is much larger than the keep alive timer duration (5 seconds). Also keep alive operations in progress are counted towards the session being active.

Change to only count operations other than keep alive towards "active" state of the session. This has limited risk due to the fact that a reference count is being held by the twin keeping the session active despite its activity state. Once the reference count is released, we want the session GC to kick in and collect the "inactive" session.

@marcschier marcschier requested a review from a team as a code owner November 22, 2022 11:15
@marcschier marcschier marked this pull request as draft November 22, 2022 11:16
@marcschier marcschier changed the title Enable eviction Fix sessions in Twin are not closed when endpoint is deactivated. Nov 22, 2022
@marcschier marcschier marked this pull request as ready for review November 22, 2022 11:35
@marcschier marcschier merged commit 40aa56c into release/2.8.4_rc Nov 22, 2022
@marcschier marcschier deleted the mschier/twinstatefix branch November 22, 2022 12:25
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.

2 participants