Page MenuHomePhabricator

Fix several duplication/replay behaviors in Aphlict
ClosedPublic

Authored by epriestley on Apr 18 2017, 6:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 6, 9:20 AM
Unknown Object (File)
Sat, Mar 30, 4:32 AM
Unknown Object (File)
Thu, Mar 28, 5:16 PM
Unknown Object (File)
Feb 28 2024, 7:10 AM
Unknown Object (File)
Feb 24 2024, 12:45 AM
Unknown Object (File)
Feb 15 2024, 7:53 PM
Unknown Object (File)
Feb 3 2024, 3:37 PM
Unknown Object (File)
Jan 31 2024, 11:41 PM
Subscribers
None

Details

Summary

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

Repository
rP Phabricator
Branch
duplicate1
Lint
Lint Passed
Unit
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.