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

Apply future deadlocks if quorum cannot be reached #498

Open
tylertreat opened this issue Mar 20, 2022 · 2 comments
Open

Apply future deadlocks if quorum cannot be reached #498

tylertreat opened this issue Mar 20, 2022 · 2 comments

Comments

@tylertreat
Copy link
Contributor

tylertreat commented Mar 20, 2022

I believe this is a duplicate of #145 which was closed due to no activity but appears to be unresolved.

I have calls to Apply which sometimes occur at the same time as nodes in the cluster being stopped, e.g. in unit/integration tests. In this situation, waiting on the result from the future returned by Apply (deferError.Error()) will block forever, causing the test to deadlock. This is because deferError is waiting on a response from the errCh which is never going to come.

Interestingly, a change was added a while back to add a ShutdownCh to deferError to allow futures to react to shutdowns. However, this appears to only be used to address a deadlock that occurred when snapshots are taken.

It seems to me like deferError ought to have a timeout on it, either taking its own timeout on calls to Error() or by respecting the timeout passed to Apply(). Given that the future returned by Apply involves RPCs and consensus, it seems like this should have a timeout to prevent potential deadlock situations.

@stale
Copy link

stale bot commented Jun 12, 2022

Hey there,
We wanted to check in on this request since it has been inactive for at least 90 days.
Have you reviewed the latest godocs?
If you think this is still an important issue in the latest version of the Raft library or
its documentation please feel let us know and we'll keep it open for investigation.
If there is still no activity on this request in 30 days, we will go ahead and close it.
Thank you!

@stale stale bot added the waiting-reply label Jun 12, 2022
@tylertreat
Copy link
Contributor Author

Please keep this open.

@stale stale bot removed the waiting-reply label Jun 13, 2022
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

No branches or pull requests

1 participant