Page MenuHomePhabricator

Fix several duplication/replay behaviors in Aphlict
ClosedPublic

Authored by epriestley on Apr 18 2017, 6:31 PM.
Tags
None
Referenced Files
F13230756: D17722.diff
Mon, May 20, 11:18 PM
F13227496: D17722.diff
Mon, May 20, 3:47 AM
F13226892: D17722.diff
Sun, May 19, 11:57 PM
F13219373: D17722.id42623.diff
Sat, May 18, 5:53 PM
F13210460: D17722.diff
Fri, May 17, 4:52 AM
F13196058: D17722.diff
Sun, May 12, 10:54 PM
F13192083: D17722.id42625.diff
Sun, May 12, 4:59 AM
F13175753: D17722.id.diff
Wed, May 8, 7:12 AM
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.