1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 17:28:51 +02:00
phorge-phorge/src/applications/doorkeeper
epriestley 138efb2b10 Recover from a race when importing external objects (like JIRA issues) for the first time
Summary:
Fixes T11604. If we send two requests to render a brand new tag at about the same time (say, 50ms apart) but JIRA takes more than 50ms to return from its API call, the two processes will race one another and try to save the same external object.

If they do, have whichever one lost the race just load the object the other one created.

Apply this to other bridges, too.

Test Plan:
  - Created a new task in JIRA.
  - Referenced it for the first time in Differential, in a comment.
  - This causes two tag renders to fire. This //might// be a bug but I spend 30 seconds on it without figuring out what was up. Regardless, we should fix the race even if the reason it's triggering so easily legitimately is a bug.
  - Before patch: big error dialog (as in T11604).
  - After patch: smooth sailing.

{F1804008}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11604

Differential Revision: https://secure.phabricator.com/D16514
2016-09-07 11:16:42 -07:00
..
application Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
bridge Recover from a race when importing external objects (like JIRA issues) for the first time 2016-09-07 11:16:42 -07:00
controller Update Doorkeeper for handleRequest 2015-08-10 09:08:04 -07:00
edge Modernize remaining edge types 2015-01-03 10:58:20 +11:00
engine Begin bridging GitHub objects through Doorkeeper 2016-03-09 09:29:21 -08:00
engineextension When an object has been imported from an external source, show a curtain panel 2016-03-25 14:05:27 -07:00
exception Apply some autofix linter rules 2014-09-10 06:55:05 +10:00
option Update to use PHUIRemarkupView everywhere possible 2016-02-16 14:05:53 -08:00
phid Bridge GitHub users into Phabricator and attribute actions to them 2016-03-28 13:10:32 -07:00
query Bridge GitHub users into Phabricator and attribute actions to them 2016-03-28 13:10:32 -07:00
remarkup Rename some remarkup classes 2015-06-08 11:27:20 +10:00
storage Bridge GitHub users into Phabricator and attribute actions to them 2016-03-28 13:10:32 -07:00
view Use PhutilInvalidStateException 2015-05-14 07:53:52 +10:00
worker JIRA Integration: Link and/or Comment 2015-11-12 19:30:43 +00:00