Page MenuHomePhabricator

Fix several duplication/replay behaviors in Aphlict

Authored by epriestley on Apr 18 2017, 6:31 PM.
Referenced Files
F12165453: D17722.diff
Thu, Sep 7, 12:16 AM
F12157468: D17722.diff
Tue, Sep 5, 6:28 AM
F12153678: D17722.diff
Mon, Sep 4, 2:02 AM
F12150111: D17722.id42623.diff
Sat, Sep 2, 3:59 PM
F12133801: D17722.diff
Aug 25 2023, 1:40 AM
F12127612: D17722.id42625.diff
Aug 19 2023, 7:38 PM
Unknown Object (File)
Aug 14 2023, 4:12 AM
Unknown Object (File)
Aug 14 2023, 3:38 AM



Ref T12566. Ref T12563. This fixes three bugs with Aphlict replay stuff:

First, Conphernece would try to repaint the UI even if no thread was open. Only repaint when a thread is open.

Second, although we deduplicate JX.Leader messages, we didn't deduplicate actual notification messages. If you browsed the leader window, then it re-elected itelf as a leader and replayed history, it could rebroadcast notifications and other windows could show doubles. Deduplicate notifications to prevent this.

Third, we always replayed the last 60 seconds of history. When you browsed the leader window, whichever window became the new leader (possibly the one you just browsed) could replay messages from before it had opened, leading to duplicate messages. Particularly, after receiving a message and then browsing you could see that message again. Instead, only replay history as far back as when the window first opened.

Test Plan
  • Clicked "Repaint" with a thread open, saw a repaint. Clicked "Repaint" with Conpherence open but no thread, no repaint and no 404 request to /update/null/.
  • In browser A, opened three windows. In browser B, sent a notification. In browser A, browsed the leader window away twice in a row. Observed that the window which never became a leader doesn't duplicate notifications.
  • In browser A, opened three windows. In browser B, sent a notification. In browser A, browsed the leader window away over and over again. Observed that replay requests issued with appropriate history windows.

Diff Detail

rP Phabricator
Lint Passed
Tests Passed
Build Status
Buildable 16557
Build 22066: Run Core Tests
Build 22065: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Apr 18 2017, 6:46 PM
This revision was automatically updated to reflect the committed changes.