Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions adapter/dynamodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -8005,6 +8005,15 @@ func (d *DynamoDBServer) ensureLegacyTableMigrationLocked(ctx context.Context, t
if !exists || !schema.needsLegacyKeyMigration() {
return nil
}
// Admin read-only callers (AdminScanTable) must not trigger
// migration writes. Their own pre-check at the admin readTS
// already rejects needs-migration tables, but the schema can
// transition between that check and this one (Codex r8 P2 on
// PR #805) — refuse rather than racing into write-path code.
if isAdminReadOnlyContext(ctx) {
return errors.Wrap(ErrAdminDynamoValidation,
"table requires a one-time legacy-key migration before admin read endpoints are available; migrate via the SigV4 surface first")
}
if !schema.usesOrderedKeyEncoding() {
err = d.startLegacyTableKeyMigration(ctx, schema, readTS)
} else {
Expand Down
Loading
Loading