Expensify / Bedrock

Rock solid distributed database specializing in active/active automatic failover and WAN replication
https://bedrockdb.com
GNU Lesser General Public License v3.0
1.12k stars 85 forks source link

Allow standup with outstanding peers #1897

Closed tylerkaraszewski closed 2 weeks ago

tylerkaraszewski commented 2 weeks ago

Details

This change is very simple. It simply does not require all peers to have responded before standing up. If enough peers have responded to form QUORUM, we can stand up.

This sounds less safe than existing code, what if the last node to respond really wants to say "NO, WAIT, YOU CAN'T STAND UP!"? But we didn't wait for it?

This never actually happens, there's not really a path for it to happen, and even if one node wants to keep the cluster down, if the rest of the cluster agrees that it can stand up, shouldn't we? The whole cluster should overrule this node. What we've actually seen is a single node being too far behind to respond keeping the cluster from coming up.

Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/425705

Tests

Existing tests.


Internal Testing Reminder: when changing bedrock, please compile auth against your new changes

tylerkaraszewski commented 2 weeks ago

Oh, @cead22 - I already merged but you can do a retrospective review if you like. I just remembered you wanted to be tagged on this stuff.

cead22 commented 2 weeks ago

Yes thank you!

danieldoglas commented 2 weeks ago

Thanks for tagging me as well, I was not able to review it before you merged but appreciate it!