fix: used to sync log to leader's commit which lags behind applied
This used to cause flakyness of test_bucket_rebalancing_respects_replication_factor like this:
-
governor proposes entry at index N with weight updates, and waits till it's applied
-
commit index is not updated yet, but governor calls rpc::sharding to update the weights in the vshard subsystem on instances and passes the lagging commit index for syncing
-
peers sync up to the lagging commit index and then reconfigure vshard to the outdated weights
-
governor thinks everything is in order and waits for updates
-
the test fails because buckets don't get rebalanced to the storages with weights set to 0
Edited by Georgy Moshkin