…bes when verified
Every request on every site re-proved two facts that rarely change:
- GroupRegistrar::ensureDataMachineGroup on action_scheduler_init ran SHOW
TABLES plus a group lookup (2 queries). The init hook now calls
ensureDataMachineGroupIfStale, which trusts a per-site confirmation for an
hour. The claim path in ScopedDrainService still ensures the group live.
- datamachine_maybe_install_post_identity_reservations validated the
reservation schema (5 queries) before checking its marker. It now trusts
the marker; any reservation database error clears the marker, so a lost
table is revalidated and repaired on the next request.
The Action Scheduler table probe in queue tuning stays live: the multisite
contract requires a schema that disappears to unhook the runner at the next
init.
Refs #3711
Refs #3711. Saves 7 queries per request on every site, measured on production events.extrachill.com (
validate_schema= 5,ensureDataMachineGroup= 2).Change
action_scheduler_initnow calls the newGroupRegistrar::ensureDataMachineGroupIfStale().datamachine_as_group_verified, a unix time) forVERIFY_TTL= 1 hour.ScopedDrainServicestill calls the liveensureDataMachineGroup()right before staking a group-scoped claim. That's where a missing group would actually hurt.datamachine_maybe_install_post_identity_reservations()now checks its version marker before runningvalidate_schema().PostIdentityReservations::log_failure()clears the marker on any error-level database failure, so the next request revalidates and repairs.uninstall.phpdeletes the new option.Deliberately not changed
QueueTuningstill runsGroupRegistrar::tablesExist()live (4 queries).action-scheduler-multisite-smokeasserts that a schema which disappears unhooks the runner and dispatchers at the nextaction_scheduler_init, and caching would break that contract. The remaining cost could be cut to oneSHOW TABLES LIKEquery, but that means reworking the legacy multisite fixture, so I left it for a follow-up on #3711.Tests
tests/action-scheduler-group-registration-smoke.php: new checks that:tests/setup-schema-runtime-smoke.php: checks that:Provenance
I profiled production in Extra-Chill/extrachill#428. Homeboy cook routes were unavailable (Lab runner disconnected, Extra-Chill/homeboy#16819; local provider auth failed). Chubes explicitly authorized writing this directly, so it was written and verified outside Homeboy.
🤖 AI disclosure: written by Extra Chill Bot (an AI agent), authorized by Chubes.