emqx / mria

Asynchronously replicated Mnesia-like database for Erlang/Elixir
https://www.emqx.com
Apache License 2.0
120 stars 23 forks source link

fix: immediately unset a core node for all shards, when that core node is down #155

Open SergeTupchiy opened 1 year ago

SergeTupchiy commented 1 year ago

This fix should reduce the risk of delegating a write operation (RPC) to a down core node.

Relates to: EMQX-10703, emqx#11310

SergeTupchiy commented 1 year ago

NOTE: please don't merge it, as it doesn't look absolutely worthwhile. The mentioned issues will be fixed in EMQX. The main goal of this PR is to attract attention to the fact that RPC to core node may fail because the core node is not ready/down even though a nodedown monitor message has been already received/processed by mria_membership, but mria_lbhas not updated core nodes because it is doing it only periodically (not event driven).

zmstone commented 1 year ago

lgtm