[
https://issues.apache.org/jira/browse/RATIS-2174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tsz-wo Sze resolved RATIS-2174.
-------------------------------
Fix Version/s: 3.2.0
Resolution: Fixed
The pull request is now merged. [~tohsakarin__] , thanks a lot for working
hard on this!
> Move future.join outside the lock
> ---------------------------------
>
> Key: RATIS-2174
> URL: https://issues.apache.org/jira/browse/RATIS-2174
> Project: Ratis
> Issue Type: Wish
> Affects Versions: 3.1.0, 3.1.1
> Reporter: yuuka
> Assignee: yuuka
> Priority: Major
> Fix For: 3.2.0
>
> Attachments: 1168_review.patch
>
> Time Spent: 6h 50m
> Remaining Estimate: 0h
>
>
> In RATIS-2162, we solved a deadlock problem, but after observing for a few
> days, there may still be potential deadlock problems elsewhere.
>
> The main reason for deadlock is to hold a lock and wait for a future.
>
> So I suggest waiting for the future outside the lock as much as possible,
> which should avoid deadlocks
>
> Currently, I found that calling *changeToFollower* in the following functions
> causes the above situation:
> # RaftServerImpl.appendEntries
> # RaftServerImpl.RequestVote
> # checkAndInstallSnapshot
--
This message was sent by Atlassian Jira
(v8.20.10#820010)