Page MenuHomePhabricator

Introduce storage patch "phases" to allow index-rebuilding patches to execute after worker queue schema changes
ClosedPublic

Authored by epriestley on Jan 29 2021, 12:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 11:00 AM
Unknown Object (File)
Tue, Nov 12, 2:22 PM
Unknown Object (File)
Tue, Nov 12, 5:53 AM
Unknown Object (File)
Sun, Nov 3, 6:58 AM
Unknown Object (File)
Oct 12 2024, 1:39 AM
Unknown Object (File)
Sep 30 2024, 8:34 PM
Unknown Object (File)
Sep 24 2024, 12:06 PM
Unknown Object (File)
Sep 2 2024, 6:40 PM
Subscribers
Restricted Owners Package

Details

Summary

Ref T13591. Some storage patches queue worker tasks, currently always to rebuild search indexes.

These patches can not execute in creation order if a later patch modifies the worker task table, since they'll try to perform a modern INSERT against an out-of-date table schema. Such a modification is desirable in the context of T13591, but making it causes these patches to fail.

Patches have an existing "after" mechanism which allows them to have explicit dependencies. This mechanism could be used to resolve this issue, but all patches with a dependency like this would need to be updated every time the queue table changes.

Instead, introduce "phases" to provide broader ordering rules. There are now two phases: "default" and "worker". Patches in the "worker" phase execute after patches in the "default" phase.

Phases may eventually be further separated, but

Test Plan
  • Ran bin/storage status, saw patches annotated with phases.
  • Will apply containerPHID changes on top of this.

Diff Detail

Repository
rP Phabricator
Branch
phase1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 25061
Build 34577: Run Core Tests
Build 34576: arc lint + arc unit