FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Most new clients propose leadership when there is actually a leader

Open vladsud opened this issue 7 years ago • 3 comments

Looking at fluid-fetcher analyzes of latest readout file, I've noticed we have too many proposals & rejections. All of them seems to be coming from new clients always proposing leadership immediately after joining (literary first op). This is not just 1-off issue or some weird case - even second client (on op #30) does that. And yet, it's not 100% correlation:

join 1,537 propose 907

Can you please poke at it and see what's going on? Sounds like it should be easy to repro. It's possible it has something to do with difference in states between snapshot & latest state - i.e. if snapshot does not have leader, do we always propose leadership even if by the time we are connected, we know there is a leader?

Note: I'll look into why we have so many sessions - clients lose connection quite often.

vladsud avatar Sep 29 '19 05:09 vladsud

I was playing with the idea of alternate leadership mechanism for a while. Previously, proposals were the only mechanism to get a consensus. But now with the scheduler component and consensus-register dds, it's much easier to reach a consensus and we don't need that many proposals.

I updated how leader's are calculated in master (not in 0.10). My tests are working fine. We can add it to 0.10 and test it out. All the variables and events are still the same so app does not need to do anything else. In addition, I added a "notleader" event to propagate that this client is not the leader anymore. This is useful since we have readonly clients now. And app can use it revert back the leader related tasks.

PR: https://github.com/microsoft/FluidFramework/pull/155/files

tanviraumi avatar Sep 29 '19 20:09 tanviraumi

Thanks Tanvir! Arin - can you please sync up with Tanvir and see what's the right action is for 10.0? Thanks!

vladsud avatar Sep 29 '19 20:09 vladsud

I assume this is addressed in master. We no longer porting things to 0.10 and will move Bohemia to 0.11 shortly.

vladsud avatar Oct 31 '19 02:10 vladsud