| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('ABSPATH')) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
/** |
| 8 |
* Base class for ViewBuildOrchestrator collaborators. |
| 9 |
* |
| 10 |
* The view-build pipeline still has intentional cross-calls between stages, |
| 11 |
* progress bookkeeping, host probes, and watermark gates. This bridge keeps |
| 12 |
* those calls routed through the orchestrator while each collaborator owns its |
| 13 |
* local state. |
| 14 |
* |
| 15 |
* @property mixed $dbCore |
| 16 |
* @property mixed $f |
| 17 |
* @property mixed $fallbackLockLoggedThisRequest |
| 18 |
* @property mixed $filesystemEnvironmentProbeCache |
| 19 |
* @property mixed $hostStagedQueryLimitSecondsCache |
| 20 |
* @property mixed $lastBatchProgressDetail |
| 21 |
* @property mixed $lastNamedLockUnsupportedError |
| 22 |
* @property mixed $lastNamedLockUnsupportedReason |
| 23 |
* @property mixed $logger |
| 24 |
* @property mixed $logsRepo |
| 25 |
* @property mixed $namedLockSupportedThisRequest |
| 26 |
* @property mixed $phpEnvironmentProbeCache |
| 27 |
* @property mixed $prefixAtStageOne |
| 28 |
* @property ABJ_404_Solution_RebuildHealthState|null $rebuildHealth |
| 29 |
* @property mixed $sessionVariablesProbeCache |
| 30 |
* @property mixed $sqlModeProbeCache |
| 31 |
* @property mixed $stagedQueryTimeoutSeconds |
| 32 |
* @property mixed $usingTransientFallbackLock |
| 33 |
* @property mixed $viewBuildAlreadyRanThisRequest |
| 34 |
* @property mixed $viewBuildProgressHighStakesShortNames |
| 35 |
* @property mixed $viewBuildProgressOptionNames |
| 36 |
* @property mixed $viewBuildShutdownLoggerRegistered |
| 37 |
* @property mixed $viewBuildShutdownStageKey |
| 38 |
* @property mixed $viewBuildShutdownStageNumber |
| 39 |
* @property mixed $viewBuildStageOpenForShutdown |
| 40 |
* @property mixed $viewDoneIsServeableCache |
| 41 |
* @property mixed $viewReadService |
| 42 |
* @method mixed abortStagedBuildForMutationWatermarkAdvance(...$arguments) |
| 43 |
* @method mixed acquireTransientFallbackLock(...$arguments) |
| 44 |
* @method mixed acquireViewBuildLock(...$arguments) |
| 45 |
* @method mixed activeBuildStartedWatermarkOptionName(...$arguments) |
| 46 |
* @method mixed adminMutationGateBlocks(...$arguments) |
| 47 |
* @method mixed advanceViewBuildOnce(...$arguments) |
| 48 |
* @method mixed assertBuildBufferExistsOrHalt(...$arguments) |
| 49 |
* @method mixed attemptRelaxSqlModeForBuildConnection(...$arguments) |
| 50 |
* @method mixed bufferIntegrityPassesForPromote(...$arguments) |
| 51 |
* @method mixed buildHaltTransientKey(...$arguments) |
| 52 |
* @method mixed builtWatermarkOptionName(...$arguments) |
| 53 |
* @method mixed bumpMutationWatermark(...$arguments) |
| 54 |
* @method mixed bumpStageNoProgressStreak(...$arguments) |
| 55 |
* @method mixed capturePrefixAtBuildStart(...$arguments) |
| 56 |
* @method mixed capturedPrefixForLog(...$arguments) |
| 57 |
* @method mixed claimForegroundViewBuildLease(...$arguments) |
| 58 |
* @method mixed classifyAndHandleStageFailure(...$arguments) |
| 59 |
* @method mixed classifySessionVariableWarnings(...$arguments) |
| 60 |
* @method mixed clearActiveBuildStartedWatermark(...$arguments) |
| 61 |
* @method mixed clearAdminMutationGateOptions(...$arguments) |
| 62 |
* @method mixed clearAllProgressOptions(...$arguments) |
| 63 |
* @method mixed clearPhpEnvironmentProbeCache(...$arguments) |
| 64 |
* @method mixed clearPrefixAtStageOne(...$arguments) |
| 65 |
* @method mixed clearSessionVariablesProbeCache(...$arguments) |
| 66 |
* @method mixed clearSqlModeProbeCache(...$arguments) |
| 67 |
* @method mixed clearStagedBuildDegradedState(...$arguments) |
| 68 |
* @method mixed clearViewBuildOpenStageForShutdown(...$arguments) |
| 69 |
* @method mixed clearViewDoneHardStaleNotice(...$arguments) |
| 70 |
* @method mixed countLiveRedirects(...$arguments) |
| 71 |
* @method mixed countViewBuildRows(...$arguments) |
| 72 |
* @method mixed describeBuildProgressForNotice(...$arguments) |
| 73 |
* @method mixed describeDegradedNotice(...$arguments) |
| 74 |
* @method mixed describeStagedSqlFailure(...$arguments) |
| 75 |
* @method mixed detectAndAdjustSqlMode(...$arguments) |
| 76 |
* @method mixed detectHostStagedQueryLimitSeconds(...$arguments) |
| 77 |
* @method mixed dropDeletemeTable(...$arguments) |
| 78 |
* @method mixed dropTransientBuffersIfPresent(...$arguments) |
| 79 |
* @method mixed dropTransientStagedTables(...$arguments) |
| 80 |
* @method mixed ensureFallbackLockNoticeAndLog(...$arguments) |
| 81 |
* @method mixed extendedTimeoutForKilledNonBatchedStage(...$arguments) |
| 82 |
* @method mixed fetchSessionVariablesRowOrEmpty(...$arguments) |
| 83 |
* @method mixed filesystemEnvironmentProbeOptionName(...$arguments) |
| 84 |
* @method mixed forceRestartViewBuild(...$arguments) |
| 85 |
* @method mixed foregroundViewBuildLeaseActive(...$arguments) |
| 86 |
* @method mixed formatPhpMemoryBytesHuman(...$arguments) |
| 87 |
* @method mixed gateAbortIfMutationWatermarkAdvanced(...$arguments) |
| 88 |
* @method mixed getCronStuckHours(...$arguments) |
| 89 |
* @method mixed getViewBuildProgress(...$arguments) |
| 90 |
* @method mixed getViewDoneBuiltAtTimestamp(...$arguments) |
| 91 |
* @method mixed haltIfPrefixChangedSinceStageOne(...$arguments) |
| 92 |
* @method mixed humanBatchProgress(...$arguments) |
| 93 |
* @method mixed intelligentStagedQueryTimeoutSeconds(...$arguments) |
| 94 |
* @method mixed invalidateViewDoneServeableCache(...$arguments) |
| 95 |
* @method mixed isBuildHaltedForHostFailure(...$arguments) |
| 96 |
* @method mixed isCurrentStageOptionName(...$arguments) |
| 97 |
* @method mixed isNamedLockUnsupportedError(...$arguments) |
| 98 |
* @method mixed isStageMarkedSkipped(...$arguments) |
| 99 |
* @method mixed lastBuildStartedWatermarkOptionName(...$arguments) |
| 100 |
* @method mixed legacyStartedWatermarkOptionName(...$arguments) |
| 101 |
* @method mixed localizeOrDefaultViewBuildNotice(...$arguments) |
| 102 |
* @method mixed logTimedViewBuildStage(...$arguments) |
| 103 |
* @method mixed logViewBuildProgressOptionWrite(...$arguments) |
| 104 |
* @method mixed logViewBuildShutdownDiagnostics(...$arguments) |
| 105 |
* @method mixed markBuildHaltedForHostFailure(...$arguments) |
| 106 |
* @method mixed markBuildStage(...$arguments) |
| 107 |
* @method mixed markStageSkippedForHostFailure(...$arguments) |
| 108 |
* @method mixed markViewBuildStageCompleted(...$arguments) |
| 109 |
* @method mixed markViewBuildStageStarted(...$arguments) |
| 110 |
* @method mixed markViewDoneBuildCompleted(...$arguments) |
| 111 |
* @method mixed markViewDoneInvalidatedByAdminMutation(...$arguments) |
| 112 |
* @method mixed maxBuildBufferId(...$arguments) |
| 113 |
* @method mixed maybeRaiseViewDoneHardStaleNotice(...$arguments) |
| 114 |
* @method mixed mutationWatermarkAdvancedSinceBuildStart(...$arguments) |
| 115 |
* @method mixed mutationWatermarkObservedByAdminAction(...$arguments) |
| 116 |
* @method mixed mutationWatermarkObservedByAdminActionAt(...$arguments) |
| 117 |
* @method mixed mutationWatermarkObservedByAdminActionAtOptionName(...$arguments) |
| 118 |
* @method mixed mutationWatermarkObservedByAdminActionOptionName(...$arguments) |
| 119 |
* @method mixed normalizePathPrefix(...$arguments) |
| 120 |
* @method mixed optionReadBackMatches(...$arguments) |
| 121 |
* @method mixed parsePhpMemoryLimitToBytes(...$arguments) |
| 122 |
* @method mixed pathFallsWithinAny(...$arguments) |
| 123 |
* @method mixed performFreshStartCleanup(...$arguments) |
| 124 |
* @method mixed phpDisabledFunctionsList(...$arguments) |
| 125 |
* @method mixed phpEnvironmentProbeOptionName(...$arguments) |
| 126 |
* @method mixed phpTimeRemainingSeconds(...$arguments) |
| 127 |
* @method mixed prefixAtStageOneOptionName(...$arguments) |
| 128 |
* @method mixed probeFilesystemEnvironmentForBuild(...$arguments) |
| 129 |
* @method mixed probeFloatFromValues(...$arguments) |
| 130 |
* @method mixed probeIntFromValues(...$arguments) |
| 131 |
* @method mixed probeMemoryLimitForS9(...$arguments) |
| 132 |
* @method mixed probePhpEnvironmentForBuild(...$arguments) |
| 133 |
* @method mixed probeSessionVariablesAtS1Entry(...$arguments) |
| 134 |
* @method mixed probeSetTimeLimitAvailability(...$arguments) |
| 135 |
* @method mixed probeSqlModeForBuild(...$arguments) |
| 136 |
* @method mixed probeStringFromValues(...$arguments) |
| 137 |
* @method mixed progressOptionName(...$arguments) |
| 138 |
* @method mixed publishBuiltWatermarkFromActiveBuildStartedWatermark(...$arguments) |
| 139 |
* @method mixed readActiveBuildStartedWatermark(...$arguments) |
| 140 |
* @method mixed readProgressOption(...$arguments) |
| 141 |
* @method mixed readWatermarkOption(...$arguments) |
| 142 |
* @method mixed rebuildViewDoneInBackground(...$arguments) |
| 143 |
* @method mixed reconcilePostStageElevenState(...$arguments) |
| 144 |
* @method mixed reconcileStagedTablesAtRunnerStartup(...$arguments) |
| 145 |
* @method mixed recordStageBatchKilled(...$arguments) |
| 146 |
* @method mixed registerViewBuildShutdownDiagnostics(...$arguments) |
| 147 |
* @method mixed releaseAndReacquireBetweenStages(...$arguments) |
| 148 |
* @method mixed releaseViewBuildLock(...$arguments) |
| 149 |
* @method mixed resetStageNoProgressStreak(...$arguments) |
| 150 |
* @method mixed resetViewBuildLockFallbackMemos(...$arguments) |
| 151 |
* @method mixed resetViewBuildOncePerRequestGuard(...$arguments) |
| 152 |
* @method mixed resetViewBuildShutdownLoggerRegistration(...$arguments) |
| 153 |
* @method mixed resolveColumnCollationForStagedBuild(...$arguments) |
| 154 |
* @method mixed runForceRestartCleanupInsideLock(...$arguments) |
| 155 |
* @method mixed runIdRangeBatchedUpdate(...$arguments) |
| 156 |
* @method mixed runInsertBatch(...$arguments) |
| 157 |
* @method mixed runNonBatchedStageWithKillStreakEscape(...$arguments) |
| 158 |
* @method mixed runPageLoadFallbackAdvance(...$arguments) |
| 159 |
* @method mixed runRedirectsForViewCountStaged(...$arguments) |
| 160 |
* @method mixed runRedirectsForViewStaged(...$arguments) |
| 161 |
* @method mixed runS11SwapWithPreRenameWatermarkRecheck(...$arguments) |
| 162 |
* @method mixed runStagedBuildOnce(...$arguments) |
| 163 |
* @method mixed runStagedBuildStages6Through11(...$arguments) |
| 164 |
* @method mixed runStagedSqlFile(...$arguments) |
| 165 |
* @method mixed runStagedSqlFileTolerantOfDuplicateKey(...$arguments) |
| 166 |
* @method mixed runTimedViewBuildStage(...$arguments) |
| 167 |
* @method mixed safeCurrentMutationWatermark(...$arguments) |
| 168 |
* @method mixed sanitizeUrlBeforeInsert(...$arguments) |
| 169 |
* @method mixed scheduleViewDoneRebuild(...$arguments) |
| 170 |
* @method mixed sessionVariablesProbeOptionName(...$arguments) |
| 171 |
* @method mixed setFilesystemEnvAdminNotice(...$arguments) |
| 172 |
* @method mixed setLowMemoryLimitAdminNotice(...$arguments) |
| 173 |
* @method mixed setSessionEnvAdminNotice(...$arguments) |
| 174 |
* @method mixed setStagedBuildDegradedNotice(...$arguments) |
| 175 |
* @method mixed setStagedBuildHaltNotice(...$arguments) |
| 176 |
* @method mixed setViewBuildCronStuckNotice(...$arguments) |
| 177 |
* @method mixed setViewBuildScheduleFailedNotice(...$arguments) |
| 178 |
* @method mixed setViewDoneHardStaleNotice(...$arguments) |
| 179 |
* @method mixed splitOpenBasedirPaths(...$arguments) |
| 180 |
* @method mixed sqlModeProbeOptionName(...$arguments) |
| 181 |
* @method mixed stageAddPreJoinIndexes(...$arguments) |
| 182 |
* @method mixed stageAddSortIndexes(...$arguments) |
| 183 |
* @method mixed stageCreateBuildTable(...$arguments) |
| 184 |
* @method mixed stageInsertRedirectsBatched(...$arguments) |
| 185 |
* @method mixed stageNoProgressStreakOptionName(...$arguments) |
| 186 |
* @method mixed stageRenameSwap(...$arguments) |
| 187 |
* @method mixed stageSkipOptionName(...$arguments) |
| 188 |
* @method mixed stageUpdateExternal(...$arguments) |
| 189 |
* @method mixed stageUpdateHits(...$arguments) |
| 190 |
* @method mixed stageUpdateHome(...$arguments) |
| 191 |
* @method mixed stageUpdatePostsBatched(...$arguments) |
| 192 |
* @method mixed stageUpdateSpecial(...$arguments) |
| 193 |
* @method mixed stageUpdateTermsBatched(...$arguments) |
| 194 |
* @method mixed stagedQueryOptions(...$arguments) |
| 195 |
* @method mixed stagedTableExists(...$arguments) |
| 196 |
* @method mixed stampStartedWatermarksAtS1Entry(...$arguments) |
| 197 |
* @method mixed sweepStaleRebuildTransients(...$arguments) |
| 198 |
* @method mixed transientFallbackLockOptionName(...$arguments) |
| 199 |
* @method mixed verifyBuildLockSerializesWriter(...$arguments) |
| 200 |
* @method mixed verifyOptionWriteCoherent(...$arguments) |
| 201 |
* @method mixed verifyPrefixUnchangedSinceStageOne(...$arguments) |
| 202 |
* @method mixed viewBuildBatchSize(...$arguments) |
| 203 |
* @method mixed viewBuildBatchSizeForStage(...$arguments) |
| 204 |
* @method mixed viewBuildPerStageBudgetSeconds(...$arguments) |
| 205 |
* @method mixed viewBuildTableName(...$arguments) |
| 206 |
* @method mixed viewDeletemeTableName(...$arguments) |
| 207 |
* @method mixed viewDoneBuiltAt(...$arguments) |
| 208 |
* @method mixed viewDoneBuiltWatermark(...$arguments) |
| 209 |
* @method mixed viewDoneDataBuiltAt(...$arguments) |
| 210 |
* @method mixed viewDoneDataBuiltAtOptionName(...$arguments) |
| 211 |
* @method mixed viewDoneFreshnessOptionName(...$arguments) |
| 212 |
* @method mixed viewDoneHasRows(...$arguments) |
| 213 |
* @method mixed viewDoneIsFresh(...$arguments) |
| 214 |
* @method mixed viewDoneIsServeable(...$arguments) |
| 215 |
* @method mixed viewDoneMutationInvalidatedAt(...$arguments) |
| 216 |
* @method mixed viewDoneMutationInvalidatedAtOptionName(...$arguments) |
| 217 |
* @method mixed viewDoneTableExists(...$arguments) |
| 218 |
* @method mixed viewDoneTableName(...$arguments) |
| 219 |
* @method mixed writeProgressOption(...$arguments) |
| 220 |
* @method mixed writeWatermarkOption(...$arguments) |
| 221 |
*/ |
| 222 |
abstract class ABJ_404_Solution_ViewBuildCollaborator { |
| 223 |
|
| 224 |
/** @var ABJ_404_Solution_ViewBuildOrchestrator */ |
| 225 |
protected $host; |
| 226 |
|
| 227 |
public function __construct(ABJ_404_Solution_ViewBuildOrchestrator $host) { |
| 228 |
$this->host = $host; |
| 229 |
} |
| 230 |
|
| 231 |
/** |
| 232 |
* @param string $name |
| 233 |
* @param array<int, mixed> $arguments |
| 234 |
* @return mixed |
| 235 |
*/ |
| 236 |
public function __call(string $name, array $arguments) { |
| 237 |
return $this->host->__call($name, $arguments); |
| 238 |
} |
| 239 |
|
| 240 |
/** |
| 241 |
* @param string $name |
| 242 |
* @return mixed |
| 243 |
*/ |
| 244 |
public function __get(string $name) { |
| 245 |
return $this->host->__get($name); |
| 246 |
} |
| 247 |
|
| 248 |
/** |
| 249 |
* @param string $name |
| 250 |
* @param mixed $value |
| 251 |
* @return void |
| 252 |
*/ |
| 253 |
public function __set(string $name, $value): void { |
| 254 |
$this->host->__set($name, $value); |
| 255 |
} |
| 256 |
} |
| 257 |
|