Homec4science

Conpherence - kill race conditions around update

Authored by Bob Trahan <btrahan@phacility.com> on Mar 17 2015, 00:35.

Description

Conpherence - kill race conditions around update

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

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6713

Differential Revision: https://secure.phabricator.com/D12092

Details

Committed
Bob Trahan <btrahan@phacility.com>Mar 17 2015, 00:35
Pushed
aubortJan 31 2017, 17:16
Parents
rPHc21301d153a9: Conpherence - fix 0 messages in header race condition
Branches
Unknown
Tags
Unknown

Event Timeline

Bob Trahan <btrahan@phacility.com> committed rPH98899c822eb9: Conpherence - kill race conditions around update (authored by Bob Trahan <btrahan@phacility.com>).Mar 17 2015, 00:35