Page MenuHomePhabricator

Allow maintenance scripts to write synthetic events to the push log that act as repository updates
ClosedPublic

Authored by epriestley on Jun 1 2021, 1:50 PM.
Tags
None
Referenced Files
F13270040: D21670.diff
Wed, May 29, 8:44 AM
F13238473: D21670.id.diff
Tue, May 21, 7:27 PM
F13232055: D21670.diff
Tue, May 21, 12:59 AM
F13227259: D21670.id51569.diff
Mon, May 20, 2:12 AM
F13210926: D21670.diff
Fri, May 17, 5:20 AM
F13194829: D21670.diff
Sun, May 12, 9:54 PM
F13183446: D21670.id51569.diff
Fri, May 10, 9:05 AM
F13179301: D21670.diff
Wed, May 8, 9:06 PM
Subscribers
None

Details

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:

Screen Shot 2021-06-01 at 6.44.02 AM.png (176×1 px, 48 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Jun 1 2021, 3:30 PM
This revision was automatically updated to reflect the committed changes.