Page MenuHomePhabricator

When updating a workboard with "R", send the client visible set with version numbers
ClosedPublic

Authored by epriestley on Jul 17 2019, 5:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 4:26 AM
Unknown Object (File)
Thu, Apr 11, 4:26 AM
Unknown Object (File)
Thu, Apr 11, 4:26 AM
Unknown Object (File)
Wed, Apr 10, 6:28 PM
Unknown Object (File)
Sat, Mar 30, 11:24 AM
Unknown Object (File)
Sat, Mar 30, 8:25 AM
Unknown Object (File)
Sat, Mar 30, 8:25 AM
Unknown Object (File)
Sat, Mar 30, 8:25 AM
Subscribers
None

Details

Summary

Depends on D20652. Ref T4900. When the user presses "R", send a list of cards currently visible on the client and their version numbers.

On the server:

  • Compare the client verisons to the server versions so we can skip updates for objects which have not changed. (For now, the client version is always "1" and the server version is always "2", so this doesn't do anything meaningful, and every card is always updated.)
  • Compare the client visible set to the server visible set and "remove" any cards which have been removed from the board.

I believe this means that "R" always puts the board into the right state (except for some issues with client orderings not being fully handled yet). It's not tremendously efficient, but we can make versioning better (using the largest object transaction ID) to improve that and loading the page in the first place doesn't take all that long so even sending down the full visible set shouldn't be a huge problem.

Test Plan
  • In window A, removed a card from a board.
  • In window B, pressed "R" and saw the removal reflected on the client.
  • (Also added cards, edited cards, etc., and didn't catch anything exploding.)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable