Page MenuHomePhabricator

Move the "container updated" message for Buildables that build Diffs outside of the transaction
ClosedPublic

Authored by epriestley on Nov 15 2018, 12:10 AM.
Tags
None
Referenced Files
F13098487: D19807.diff
Fri, Apr 26, 7:27 AM
Unknown Object (File)
Fri, Apr 19, 8:06 PM
Unknown Object (File)
Wed, Apr 10, 1:38 AM
Unknown Object (File)
Sat, Mar 30, 7:58 PM
Unknown Object (File)
Mar 10 2024, 2:13 PM
Unknown Object (File)
Feb 16 2024, 5:57 PM
Unknown Object (File)
Feb 3 2024, 7:53 PM
Unknown Object (File)
Jan 4 2024, 5:15 AM
Subscribers
None

Details

Summary

Ref T13216. See PHI970. Ref T13054. See some discussion in T13216.

When a Harbormaster Buildable object is first created for a Diff, it has no containerPHID since the revision has not yet been created.

We later (after creating a revision) send the Buildable a message telling it that we've added a container and it should re-link the container object.

Currently, we send this message in applyExternalEffects(), which runs inside the Differential transaction. If Harbormaster races quickly enough, it can read the Diff object before the transaction commits, and not see the container update.

Add a didCommitTransaction() callback after the transactions commit, then move the message code there instead.

Test Plan
  • See T13216 for substantial evidence that this change is on the right track.
  • Before change: added sleep(15), reproduced the issue reliably.
  • After change: unable to reproduce issue even with sleep(15) (the containerPHID always populates correctly).

Diff Detail

Repository
rP Phabricator
Branch
race1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21150
Build 28755: Run Core Tests
Build 28754: arc lint + arc unit

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Nov 15 2018, 12:11 AM
Harbormaster failed remote builds in B21150: Diff 47301!

Stacked on qsprintf() changes.

(This also has a couple of unrelated qsprintf() changes: they reproduce by visiting the Daemon console and the changes cleared the warnings.)

This revision is now accepted and ready to land.Nov 16 2018, 7:20 PM