Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Differential
D9637
Diff 23125
src/applications/chronicle/daemon/ChronicleDaemon.php
Changeset View
This is the biggest difference in the two designs: this approach has a huge race window, up to 65 seconds + time it takes to execute the trigger, which may be long.
If a user modifies the trigger during these 65+ seconds from the web UI, their changes will be lost after the trigger executes and calls save(), overwriting the trigger and reverting it to a state it was in 65 seconds ago.
There's also a small race window at the end where a user can load, the daemon saves, then the user saves. In this case, the event will execute twice. That's OK for builds, but not good for email notifications and catastrophically bad for billing.
D11419 has more complicated infrastructure, but I believe it prevents the daemon from ever racing against the application.