Repository navigation
feat(storage): add Spanner pause scheduling schema migration - #1085
Merged
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces database migrations and schema updates to support pausing and resuming scheduling in Spanner. It adds the PauseSchedulingState and PausedTasks tables, along with corresponding index and proto bundle configurations. Additionally, it updates the migration testing framework to handle emulator-specific limitations regarding proto bundle updates. The review feedback highlights an optimization opportunity for the PausedTasksUnprocessed index: storing the Xid column and removing the redundant IsPending column from the STORING clause to ensure a fully covering index and avoid inefficient base table lookups.
andrzejfudro
force-pushed
the
feat/pause-scheduling-spanner-schema
branch
from
October 7, 2026 07:23
437834a to
d106baa
Compare
andrzejfudro
changed the base branch from
main
to
refactor/decouple-pause-scheduling-storage
October 7, 2026 07:54
andrzejfudro
force-pushed
the
feat/pause-scheduling-spanner-schema
branch
from
October 8, 2026 06:43
d106baa to
1c29ca9
Compare
andrzejfudro
changed the base branch from
refactor/decouple-pause-scheduling-storage
to
main
October 8, 2026 07:31
andrzejfudro
marked this pull request as ready for review
October 8, 2026 09:30
VLukiantsev
reviewed
Oct 8, 2026
pachopepe
previously approved these changes
Oct 8, 2026
VLukiantsev
approved these changes
Oct 8, 2026
pachopepe
approved these changes
Oct 8, 2026
…x comment Update PausedTasks.ExpirationTime to TIMESTAMP_ADD(ProcessedTime, INTERVAL 7 DAY) so pending rows (ProcessedTime IS NULL) have a NULL ExpirationTime and are never deleted by the Spanner TTL policy before replay. Also clarify why the PausedTasksUnprocessed index is unsharded. TAG=agy CONV=aca941d1-8c29-4820-96a9-0200c1071207
andrzejfudro
force-pushed
the
feat/pause-scheduling-spanner-schema
branch
from
October 9, 2026 12:04
2ed7240 to
cc4091f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the Spanner schema migration (
013_pause_scheduling.{up,down}.sql) and canonical DDL updates (ess-schema.sql) for thePauseSchedulingStateandPausedTaskstables to support Pause Scheduling persistence.PauseSchedulingState(singleton row keyed byId) andPausedTasks(interleaved inWorkUnits, with partial indexPausedTasksUnprocessedand 7-day TTL policy) to the ESS Spanner schema and migration013.//api/protos/task_queue:task_prototoexperiment_messages_descriptorinapi/protos/experiment/BUILD.bazeland registers thecloud.xmanager.v1.*Actionproto bundle types stored inPausedTasks.ActionProto(along with updatingWorkUnitStateforSCHEDULING_PAUSEDin migration013).driverinterceptorininternal/storage/spanner/migrations/testingto skipALTER PROTO BUNDLE UPDATE (cloud.xmanager.v1.WorkUnitStatus.WorkUnitState)during v13 up-migration in emulator tests.Assumptions
pausestateandpausedtask) are split into the stacked follow-up PR (feat(storage): add Spanner pause state repository #1046).TAG=agy