1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-03 20:22:46 +01:00
phorge-phorge/src/applications/diffusion/engine
epriestley 12a5eb4062 Allow maintenance scripts to write synthetic events to the push log that act as repository updates
Summary:
Ref T13614. When a script holds the write lock but modifies the repository directly (rather than by pushing), the repository version won't change when the script releases the write lock. Thus, the writes may not propagate to other nodes (it depends which node lucks out and accepts the next write).

To guarantee that writes propagate, allow these scripts to pretend they pushed the repository. These are bare-bones valid events flagged as "Maintenance".

Test Plan:
  - Wrote a script to hold the write lock, wait (or pretend to do something), then release the write lock.
  - Applied patches, modified script to use new APIs ("newMaintenanceEvent()").
  - Ran script, saw repository verison bump and relevant push logs:

{F8814923}

Maniphest Tasks: T13614

Differential Revision: https://secure.phabricator.com/D21670
2021-06-01 08:29:54 -07:00
..
DiffusionCommitDraftEngine.php Allow "has draft inlines?" queries to overheat 2020-05-20 14:25:34 -07:00
DiffusionCommitHookEngine.php Allow maintenance scripts to write synthetic events to the push log that act as repository updates 2021-06-01 08:29:54 -07:00
DiffusionCommitTimelineEngine.php Remove "willRenderTimeline()" from ApplicationTransactionInterface 2018-12-20 14:55:07 -08:00