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, Dec 12, 12:33 PM
Unknown Object (File)
Sun, Dec 1, 4:52 AM
Unknown Object (File)
Fri, Nov 29, 11:43 AM
Unknown Object (File)
Fri, Nov 29, 5:29 AM
Unknown Object (File)
Wed, Nov 27, 2:05 AM
Unknown Object (File)
Sat, Nov 23, 1:30 PM
Unknown Object (File)
Nov 18 2024, 10:41 PM
Unknown Object (File)
Nov 15 2024, 11:52 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