Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

fix: prevent session to be actively closed when it gets response from server #85

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

neverchanje
Copy link

@neverchanje neverchanje commented Jan 6, 2020

This PR decouples SessionFailureDetector from ReplicaSession.

SessionFailureDetector is responsible for client failure detection to PegasusServer. If continuous timeouts across FAILURE_DETECT_WINDOW_MS occurred, the session will automatically disconnect.


// Session is marked failure if all the RPCs across
// `sessionResetTimeWindowMs` are timed out.
public static final long FAILURE_DETECT_WINDOW_MS = 10 * 1000; // 10s
Copy link
Member

Choose a reason for hiding this comment

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

maybe 10s is too short? consider set it to 30s or 60s?

Copy link
Author

Choose a reason for hiding this comment

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

I keep it as it was in this refactoring. I will consider a larger window if it makes sense.

@neverchanje neverchanje changed the base branch from thrift-0.11.0-inlined to master September 15, 2020 10:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants