Page MenuHomePhabricator

Conpherence - kill race conditions around update
ClosedPublic

Authored by btrahan on Mar 16 2015, 11:19 PM.
Tags
None
Referenced Files
F13214181: D12092.id.diff
Fri, May 17, 9:02 AM
F13178104: D12092.diff
Wed, May 8, 8:11 PM
Unknown Object (File)
Thu, Apr 25, 3:18 AM
Unknown Object (File)
Thu, Apr 25, 3:18 AM
Unknown Object (File)
Thu, Apr 25, 1:28 AM
Unknown Object (File)
Apr 11 2024, 8:58 AM
Unknown Object (File)
Apr 6 2024, 4:30 AM
Unknown Object (File)
Feb 8 2024, 6:10 AM
Subscribers

Details

Summary

Fixes T6713. The idea is to keep checking what's going on in the update paths that touch the DOM. If we're doing an update or should be doing a different update, then we bail early.

This is the type of code + testing that makes me dizzy after awhile, but I think it works...

Test Plan

added a "forceStall" parameter to the column view controller, which when specified sleeps for seconds before returning. I then augmented the JS such that the "send message" code for the durable column would specifiy this parameter.

For actual testing, I then spammed the heck out of the durable column channel and saw each message only once. I also spammed the column, switched browsers to a user on the same thread in the normal "speedy" view, sent messages there, and also only received one copy

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Conpherence - kill race conditions around update.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added reviewers: epriestley, chad.
epriestley edited edge metadata.
epriestley added inline comments.
webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
280–292

Can this and the identical-looking block above be merged into a single method call?

This revision is now accepted and ready to land.Mar 16 2015, 11:24 PM
btrahan edited edge metadata.

consolidate duplcate code into helper function

This revision was automatically updated to reflect the committed changes.