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 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)
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
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
Branch
T6713
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4900
Build 4918: [Placeholder Plan] Wait for 30 Seconds

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.