Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
4feaeb6
feat(proto): add AlterTableAutoIncrement message and action type
ULookup May 20, 2026
6d36940
chore: regenerate protobuf Go code for AlterAutoIncrement
ULookup May 20, 2026
c801a99
feat(api): add NewUpdateAutoIncrementReq helper
ULookup May 20, 2026
1cba5f8
feat(plan): handle TableOptionAutoIncrement in inplace ALTER TABLE
ULookup May 20, 2026
2d7609a
feat(compile): execute AlterAutoIncrement action in ALTER TABLE
ULookup May 20, 2026
5bb5114
fix(plan): add deepcopy case for AlterAutoIncrement action
ULookup May 20, 2026
b7af31c
test: add ALTER TABLE AUTO_INCREMENT parser tests
ULookup May 20, 2026
9dc8de0
fix(plan): add copy handler and fix off-by-one in auto_increment offset
ULookup May 20, 2026
bd67a23
fix(plan): improve error message in COPY path when table has no AUTO_…
ULookup May 21, 2026
770ad28
fix(plan): improve error message when ALTER TABLE AUTO_INCREMENT targ…
ULookup May 21, 2026
fe15021
fix(engine): return error in mock SetOffset when tableID not found
ULookup May 21, 2026
2236285
fix(incrservice): guard SetOffset in memStore against lowering the of…
ULookup May 21, 2026
967ae2f
fix(incrservice): guard SetOffset in sqlStore against lowering the of…
ULookup May 21, 2026
9f83fe7
fix(test): guard SetOffset in mock against lowering the offset
ULookup May 21, 2026
aa3a6e0
test(plan): add AUTO_INCREMENT=5 regression test for low-value guard
ULookup May 21, 2026
c20ce2c
feat(incrservice): add SetOffset with never-decrease semantics for AL…
ULookup May 21, 2026
877223a
fix: address review findings for issue #23143
ULookup May 21, 2026
f8f6e31
fix(plan): use AutoIncr instead of nonexistent GetAutoIncrement
ULookup May 22, 2026
87705fa
fix(incrservice): replace fmt.Errorf with moerr.NewInternalErrorf in …
ULookup May 22, 2026
06b8ddf
fix: add AutoIncr field to mock schema and replace remaining fmt.Errorf
ULookup May 22, 2026
795811b
fix(plan): use table-level autoIncrColName instead of col.AutoIncr in…
ULookup May 22, 2026
5b36017
fix(incrservice): simplify ALTER TABLE AUTO_INCREMENT — handle entire…
ULookup May 22, 2026
480a897
fix(plan): handle AUTO_INCREMENT = 0 correctly, fix nil action panic
ULookup May 26, 2026
9e9a4e8
fix(plan): gofmt mock.go struct field alignment
ULookup May 26, 2026
8507025
fix(test): update alter.result for AUTO_INCREMENT error message change
ULookup May 26, 2026
4b3b076
fix(plan): exclude hidden columns from AUTO_INCREMENT check
ULookup May 26, 2026
b45d012
fix(incrservice): address review feedback for ALTER TABLE AUTO_INCREM…
ULookup May 27, 2026
dc61416
fix(incrservice): remove tautological nil check in UpdateMinValue
ULookup May 27, 2026
cfabd7f
fix(incrservice): revert hidden column filter in GetAutoColumnFromDef
ULookup May 27, 2026
e46d0b3
test: add BVT coverage for ALTER TABLE AUTO_INCREMENT success path
ULookup May 27, 2026
cf8b2f2
fix(incrservice): remove never-decrease guard in SetOffset
ULookup May 27, 2026
ee4bcea
test: cover alter auto increment offset paths
ULookup May 28, 2026
9a11e4c
fix(incrservice): add monotonic guard to SetOffset in real stores
ULookup Jun 2, 2026
d770509
fix(incrservice): allow SetOffset to decrease offset after pre-alloca…
ULookup Jun 2, 2026
e53bb2c
fix(incrservice): add ForceSetOffset to handle pre-allocation gap
ULookup Jun 2, 2026
62c5e00
fix: gofmt service_test.go to remove extra blank line
ULookup Jun 3, 2026
2ea89b0
fix(plan): remove autoIncrColName from shared mock schemas, isolate t…
ULookup Jun 5, 2026
9fcde40
fix(plan): gofmt whitespace in mock.go
ULookup Jun 5, 2026
97f9ad6
fix: address alter auto increment review blockers
ULookup Jul 9, 2026
247b02e
fix: avoid committed read when altering auto increment
ULookup Jul 9, 2026
1d71564
fix(compile): avoid released process in auto increment callback
ULookup Jul 10, 2026
008c395
fix: persist altered auto increment offset in schema
ULookup Jul 13, 2026
9dab19e
fix: restore schema version on statement rollback
ULookup Jul 13, 2026
ba60390
fix: stop alter auto increment after cancellation
ULookup Jul 13, 2026
151d726
fix: isolate auto increment caches by table version
ULookup Jul 13, 2026
df76a2f
fix: prevent stale cache epoch resurrection
ULookup Jul 13, 2026
d3f32c2
fix: fence auto increment commits by table version
ULookup Jul 13, 2026
98c4481
fix: distinguish unknown table versions
ULookup Jul 13, 2026
17c78c4
fix: reconcile copy auto increment with copied rows
ULookup Jul 13, 2026
1f72d12
fix: reject copy auto increment overflow
ULookup Jul 13, 2026
31be11e
fix: reconcile alter copy auto increment
ULookup Jul 13, 2026
78e5a0e
fix: serialize auto increment offset resets
ULookup Jul 13, 2026
b21ca87
fix: drain allocator actions before close
ULookup Jul 13, 2026
63a8779
fix: reuse versioned cache for allocation timestamps
ULookup Jul 13, 2026
76b2bbb
test: cover auto increment offset rollback
ULookup Jul 13, 2026
1e03160
docs: plan auto increment review fixes
ULookup Jul 15, 2026
b4b7452
chore: rebase auto increment fix onto main
ULookup Jul 15, 2026
4b0823a
fix: isolate transactional auto increment resets
ULookup Jul 15, 2026
d470bea
fix: clean auto increment resets on alter failure
ULookup Jul 15, 2026
c042a84
fix: preserve alter retry errors during reset cleanup
ULookup Jul 15, 2026
6ccbe7c
test: cover auto increment reset serialization
ULookup Jul 15, 2026
fe04597
test: exercise auto increment serialization paths
ULookup Jul 15, 2026
743be7e
test: verify alter auto increment end to end
ULookup Jul 15, 2026
e647869
test: cover lazy cache shutdown barriers
ULookup Jul 15, 2026
8ad00c7
fix: serialize auto increment alter after dml
ULookup Jul 15, 2026
acb9df3
fix: restore auto increment fence after replay
ULookup Jul 15, 2026
fa1f197
Merge upstream/main into auto increment fix
ULookup Jul 16, 2026
d7c2870
fix: publish recovered 2pc logtails
ULookup Jul 16, 2026
8b7fa69
fix: recover replayed prepared transactions
ULookup Jul 16, 2026
93cda93
fix: retain recovering txn across state transition
ULookup Jul 16, 2026
01aaedc
fix: fence replay visibility at commit
ULookup Jul 16, 2026
75eba0b
fix: wait for replay prepare transition
ULookup Jul 16, 2026
54d99b5
test: cover auto increment with expression defaults
ULookup Jul 16, 2026
e6c281b
Merge remote-tracking branch 'upstream/main' into codex/pr-24531-rc-a…
ULookup Jul 16, 2026
0747213
fix: restore recovered transaction routes
ULookup Jul 16, 2026
b3a523b
fix: recover 2pc with maximum prepared timestamp
ULookup Jul 16, 2026
dae2ec9
fix: separate hidden auto increment allocator state
ULookup Jul 16, 2026
8c40051
fix: discard aborted auto increment cache versions
ULookup Jul 16, 2026
32bf0d6
fix: keep copy alter schema versions converged
ULookup Jul 16, 2026
9527f23
chore: remove intermediate review documents
ULookup Jul 16, 2026
7bbcb1c
fix: align schema and auto-increment epochs
ULookup Jul 17, 2026
bdcaba3
fix: fence auto increment with dedicated epoch
ULookup Jul 17, 2026
62feca2
fix: close auto increment epoch and copy fences
VioletQwQ-0 Jul 20, 2026
64d15c4
docs: clarify clone allocator map identity
VioletQwQ-0 Jul 20, 2026
eab7fbb
fix: address alter auto increment review findings
VioletQwQ-0 Jul 20, 2026
72b0582
Merge remote-tracking branch 'upstream/main' into codex/takeover-2453…
VioletQwQ-0 Jul 20, 2026
05692bc
fix: restore clone offsets after main sync
VioletQwQ-0 Jul 20, 2026
6c44b46
fix(txn): cancel blocked MEMKV recovery sends
VioletQwQ-0 Jul 21, 2026
587457e
Merge upstream/main into codex/takeover-24531-alter-auto-increment
VioletQwQ-0 Jul 21, 2026
5e22983
fix(tnservice): complete cancellation test stub
VioletQwQ-0 Jul 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions pkg/clusterservice/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,33 @@ func GetCNServiceWithoutWorkingStateWithContext(
return ctx.Err()
}

// GetAllTNServicesWithContext returns a TN service snapshot without waiting
// past ctx for the built-in cluster's initial HAKeeper refresh.
func GetAllTNServicesWithContext(
ctx context.Context,
service MOCluster,
) ([]metadata.TNService, error) {
if ctx == nil {
ctx = context.Background()
}
if err := ctx.Err(); err != nil {
return nil, err
}
if service == nil {
return nil, moerr.NewInternalErrorNoCtx("mocluster service is not initialized")
}
if builtIn, ok := service.(*cluster); ok {
if err := builtIn.waitReadyWithContext(ctx); err != nil {
return nil, err
}
services := builtIn.services.Load()
return append([]metadata.TNService(nil), services.tn...), ctx.Err()
}

services := service.GetAllTNServices()
return services, ctx.Err()
}

func lookupMOCluster(service string) (MOCluster, bool, error) {
rt := runtime.ServiceRuntime(service)
if rt == nil {
Expand Down
10 changes: 10 additions & 0 deletions pkg/clusterservice/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ func TestCNServiceSnapshotHonorsCancellationWhileClusterStarts(t *testing.T) {
require.ErrorIs(t, err, context.DeadlineExceeded)
}

func TestTNServiceSnapshotHonorsCancellationWhileClusterStarts(t *testing.T) {
c := &cluster{readyC: make(chan struct{})}
c.services.Store(&services{})
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond)
defer cancel()

_, err := GetAllTNServicesWithContext(ctx, c)
require.ErrorIs(t, err, context.DeadlineExceeded)
}

func TestClusterForceRefresh(t *testing.T) {
runClusterTest(
time.Hour,
Expand Down
138 changes: 129 additions & 9 deletions pkg/frontend/test/incrservice_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading