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

Support a config to make read index read failfast. #738

Merged
merged 3 commits into from
Dec 27, 2021

Conversation

horizonzy
Copy link
Member

Motivation:

Read index read need compare current node's apply index with leader's commit index. Only current node's apply index catch up leader's commit index, then call back success to read index closure. Therefore, there is a waiting time. The default wait timeout is 2s. It means that the waiting time over 2s, then call back failure to read index closure. If current node occur problem, it's apply index maybe behind leader's commit index. In read index timeout, it can't catch up, the timeout is waste. Here supply a config to fix it. If the gap greater than readIndexToleranceThreshold, fail fast to call back failure read index closure.

@killme2008 killme2008 merged commit 4f02797 into sofastack:master Dec 27, 2021
@fengjiachun fengjiachun mentioned this pull request Mar 17, 2022
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants