canonical / dqlite

Embeddable, replicated and fault-tolerant SQL engine.
https://dqlite.io
Other
3.77k stars 213 forks source link

replace monitor_cb by raft state_cb. #543

Closed MathieuBordere closed 7 months ago

MathieuBordere commented 7 months ago

The state_cb is called immediately after raft's state changes, while the monitor_cb was polling every loop iteration. This led e.g. to bugs where raft was assuming no longer being the leader while dqlite's state was not properly reflecting that.

Fixes #541 , also please refer to that issue for the problem description. Issue observed was similar as in #355. Relies on functionality introduced by https://github.com/canonical/raft/pull/488.

MathieuBordere commented 7 months ago

please test downstream