refactor(storage): move the gateway's four stores into submitqueue/gateway/extension/storage - #741
Merged
Merged
Conversation
roychying
added this pull request to stack #742
September 22, 2026 23:11
roychying
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
September 22, 2026 23:11
behinddwalls
left a comment
Collaborator
There was a problem hiding this comment.
Agent-written.
The service aggregate/schema split is right. These comments cover the remaining differences from the proposed structure.
behinddwalls
requested changes
Sep 23, 2026
behinddwalls
left a comment
Collaborator
There was a problem hiding this comment.
Agent-written.
Requesting changes: the 4-accessor gateway aggregate and schema split are right, but store interfaces should stay in submitqueue/extension/storage/. core/ importing gateway storage is the inversion to avoid. Also drop gateway schema from the orchestrator suite and add a union schema target for colocated deploys.
behinddwalls
force-pushed
the
chenghan.ying/sq-storage-1-gateway
branch
from
September 23, 2026 15:02
e1b1cc8 to
d13b22b
Compare
roychying
force-pushed
the
chenghan.ying/sq-storage-1-gateway
branch
from
September 23, 2026 17:24
d13b22b to
52bb2aa
Compare
roychying
force-pushed
the
chenghan.ying/sq-storage-1-gateway
branch
from
September 23, 2026 19:10
52bb2aa to
5806046
Compare
roychying
force-pushed
the
chenghan.ying/sq-storage-1-gateway
branch
from
September 23, 2026 19:22
5806046 to
d638ec2
Compare
behinddwalls
approved these changes
Sep 25, 2026
Base automatically changed from
chenghan.ying/service-scoped-extensions-rfc
to
main
September 25, 2026 01:39
…teway/extension/storage # Conflicts: # Makefile # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Author: Chenghan Ying <125171961+roychying@users.noreply.github.com> # # interactive rebase in progress; onto b7aefe7 # Last command done (1 command done): # pick d638ec2 # refactor(storage): move the gateway's four stores into submitqueue/gateway/extension/storage # No commands remaining. # You are currently rebasing branch 'chenghan.ying/sq-storage-1-gateway' on 'b7aefe7a'. # # Changes to be committed: # modified: Makefile # modified: service/submitqueue/gateway/server/BUILD.bazel # modified: service/submitqueue/gateway/server/main.go # modified: submitqueue/core/request/BUILD.bazel # modified: submitqueue/core/request/materializer.go # modified: submitqueue/core/request/materializer_test.go # modified: submitqueue/core/request/request.go # modified: submitqueue/extension/storage/BUILD.bazel # modified: submitqueue/extension/storage/mock/storage_mock.go # modified: submitqueue/extension/storage/mysql/BUILD.bazel # modified: submitqueue/extension/storage/mysql/storage.go # modified: submitqueue/extension/storage/mysql/storage_test.go # modified: submitqueue/extension/storage/storage.go # modified: submitqueue/gateway/controller/BUILD.bazel # modified: submitqueue/gateway/controller/cancel.go # modified: submitqueue/gateway/controller/land.go # modified: submitqueue/gateway/controller/land_test.go # modified: submitqueue/gateway/controller/list.go # modified: submitqueue/gateway/controller/list_test.go # modified: submitqueue/gateway/controller/log/BUILD.bazel # modified: submitqueue/gateway/controller/log/log_test.go # modified: submitqueue/gateway/controller/request_history.go # modified: submitqueue/gateway/controller/request_history_test.go # modified: submitqueue/gateway/controller/request_summary.go # modified: submitqueue/gateway/controller/request_summary_test.go # modified: submitqueue/gateway/controller/storage_fixture_test.go # new file: submitqueue/gateway/extension/storage/BUILD.bazel # new file: submitqueue/gateway/extension/storage/mock/BUILD.bazel # new file: submitqueue/gateway/extension/storage/mock/storage_mock.go # new file: submitqueue/gateway/extension/storage/mysql/BUILD.bazel # renamed: submitqueue/extension/storage/mysql/request_log_store.go -> submitqueue/gateway/extension/storage/mysql/request_log_store.go # renamed: submitqueue/extension/storage/mysql/request_log_store_test.go -> submitqueue/gateway/extension/storage/mysql/request_log_store_test.go # renamed: submitqueue/extension/storage/mysql/request_queue_summary_store.go -> submitqueue/gateway/extension/storage/mysql/request_queue_summary_store.go # renamed: submitqueue/extension/storage/mysql/request_queue_summary_store_test.go -> submitqueue/gateway/extension/storage/mysql/request_queue_summary_store_test.go # renamed: submitqueue/extension/storage/mysql/request_summary_store.go -> submitqueue/gateway/extension/storage/mysql/request_summary_store.go # renamed: submitqueue/extension/storage/mysql/request_summary_store_test.go -> submitqueue/gateway/extension/storage/mysql/request_summary_store_test.go # renamed: submitqueue/extension/storage/mysql/request_uri_store.go -> submitqueue/gateway/extension/storage/mysql/request_uri_store.go # renamed: submitqueue/extension/storage/mysql/request_uri_store_test.go -> submitqueue/gateway/extension/storage/mysql/request_uri_store_test.go # new file: submitqueue/gateway/extension/storage/mysql/schema/BUILD.bazel # renamed: submitqueue/extension/storage/mysql/schema/change_uri_request_mapping.sql -> submitqueue/gateway/extension/storage/mysql/schema/change_uri_request_mapping.sql # renamed: submitqueue/extension/storage/mysql/schema/request_log.sql -> submitqueue/gateway/extension/storage/mysql/schema/request_log.sql # renamed: submitqueue/extension/storage/mysql/schema/request_summary.sql -> submitqueue/gateway/extension/storage/mysql/schema/request_summary.sql # renamed: submitqueue/extension/storage/mysql/schema/request_summary_by_queue.sql -> submitqueue/gateway/extension/storage/mysql/schema/request_summary_by_queue.sql # new file: submitqueue/gateway/extension/storage/mysql/storage.go # new file: submitqueue/gateway/extension/storage/mysql/storage_test.go # new file: submitqueue/gateway/extension/storage/storage.go # modified: test/e2e/submitqueue/BUILD.bazel # modified: test/e2e/submitqueue/git_suite_test.go # modified: test/e2e/submitqueue/suite_test.go # modified: test/integration/submitqueue/extension/storage/BUILD.bazel # modified: test/integration/submitqueue/extension/storage/mysql/BUILD.bazel # modified: test/integration/submitqueue/extension/storage/mysql/storage_test.go # modified: test/integration/submitqueue/extension/storage/suite.go # modified: test/integration/submitqueue/gateway/BUILD.bazel # modified: test/integration/submitqueue/gateway/suite_test.go # modified: test/testutil/schema.go # modified: tool/linter/queueshard/main.go #
behinddwalls
force-pushed
the
chenghan.ying/sq-storage-1-gateway
branch
from
September 25, 2026 02:01
d638ec2 to
4e7e0ed
Compare
This branch was successfully deployed
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.
Why?
First half of the split. The gateway resolves exactly four stores — the append-only request log and the three read models — and the orchestrator the other nine, with no overlap in either direction.
What?
submitqueue/gateway/extension/storage/gains its ownFactoryand a four-accessorStorage, plus the four MySQL implementations, their tests and their four.sqlfiles. The old aggregate drops to nine accessors.The thirteen store contracts and their mocks stay at
submitqueue/extension/storage/. That package keeps its import path, so callers naming only a contract or an error are untouched.Also adds a union schema target (
//submitqueue/extension/storage:schema) plus atestutilhelper, so colocated callers name no service directory, and narrows each per-service integration suite to its own schema.Two repo-level lists needed the new package, neither discoverable from the code: the
mocksMakefile target andqueueshard'sschemaRoots.Test Plan
go build ./...,go vet ./...,make lint,make check-mocks,make check-gazelle,make check-tidyall clean;make testpasses 121/121.queueshardstill reports 25 tables.Issue