Skip to content

fix: remove read barrier from postjoin

Georgy Moshkin requested to merge fix/no-more-read-barrier into master

When instance runs postjoin function, it's supposed to have both target and current grade Offline. Taking a read barrier in that state makes no sence. Instead, an instance should set target grade online asap. Ensuring it syncs is the responsibility of the governor.

Excessive read barrier affects restart_both test. One of the instances (i1 who becomes a follower) sends a read_index request to i2 (leader). But i2 reveals self.commit_to_current_term() condition isn't met and drops the request. As a result, i1 is obliged to wait for 10s timeout before retrying read_index request again, but the test timeouts even sooner.

Merge request reports