Page MenuHomePhabricator

Conpherence - kill race conditions around update
ClosedPublic

Authored by btrahan on Mar 16 2015, 11:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 8:58 AM
Unknown Object (File)
Sat, Apr 6, 4:30 AM
Unknown Object (File)
Feb 8 2024, 6:10 AM
Unknown Object (File)
Feb 7 2024, 5:33 AM
Unknown Object (File)
Jan 18 2024, 7:53 PM
Unknown Object (File)
Jan 12 2024, 3:11 PM
Unknown Object (File)
Dec 25 2023, 1:09 AM
Unknown Object (File)
Dec 24 2023, 2:41 PM
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.