Page MenuHomePhabricator

Decrease JX.Leader lease duration from 16,000ms to 1,500ms and usurp more aggressively
ClosedPublic

Authored by epriestley on Apr 17 2017, 7:39 PM.
Tags
None
Referenced Files
F15506777: D17703.diff
Tue, Apr 15, 2:07 PM
F15457381: D17703.id42577.diff
Sun, Mar 30, 4:01 PM
F15428753: D17703.id42577.diff
Mar 23 2025, 10:05 PM
F15426688: D17703.id42596.diff
Mar 23 2025, 10:28 AM
F15423406: D17703.id.diff
Mar 22 2025, 3:19 PM
F15420408: D17703.diff
Mar 21 2025, 1:52 PM
F15413818: D17703.id42596.diff
Mar 19 2025, 9:30 PM
F15398340: D17703.diff
Mar 17 2025, 12:01 AM
Subscribers
None

Details

Summary

Ref T12573. JX.Leader synchronizes the Aphlict connection across multiple windows.

Currently, we only test to see if the leader window has been closed every 16 seconds. Instead, test every 1.5 seconds.

Also, make windows keep trying to become the leader forever. This was removed previously (in D15806) but I think that change decreased robustness here.

Test Plan
  • Opened two windows to the "Realtime" tab in DarkConsole.
  • Saw one become the leader and one become a follower.
  • (Optionally, wait for 10 seconds here to test the "keep trying to become the leader" behavior.)
  • Closed the leader.
  • Saw the follower become the leader after ~1.5 seconds.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

We also need to deal with duplicates better in general (T12564) so I'm planning to do that in a robust way at a higher level of the application and then let all the low-level stuff make tradeoffs to be more reliable at the cost of possibly emitting duplicates.

This revision is now accepted and ready to land.Apr 17 2017, 8:16 PM
This revision was automatically updated to reflect the committed changes.