Skip to content

Guard AutoDDL processing with transaction when needed - #562

Merged
mason-sharp merged 1 commit into
v5_STABLEfrom
spoc-645
Aug 12, 2026
Merged

Guard AutoDDL processing with transaction when needed#562
mason-sharp merged 1 commit into
v5_STABLEfrom
spoc-645

Conversation

@danolivo

@danolivo danolivo commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Some utility commands (e.g., CLUSTER without table name) execute outside transaction blocks, committing after each table operation. When the AutoDDL hook fires after such commands complete, catalog operations and queue insertions fail without transaction context.

This commit adds transaction and snapshot guards at the AutoDDL entry point in spock_autoddl_process().

Test case added: CLUSTER without table name after ALTER TABLE CLUSTER ON verifies that AutoDDL works correctly when invoked outside transaction context.

Some utility commands (e.g., CLUSTER without table name) execute outside
transaction blocks, committing after each table operation. When the AutoDDL
hook fires after such commands complete, catalog operations and queue insertions
fail without transaction context.

This commit adds transaction and snapshot guards at the AutoDDL entry point
in spock_autoddl_process().

Test case added: CLUSTER without table name after ALTER TABLE CLUSTER ON
verifies that AutoDDL works correctly when invoked outside transaction context.
@danolivo danolivo self-assigned this Aug 5, 2026
@danolivo danolivo added the bug Something isn't working label Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b9e2d2e-2e48-4ffe-8da2-fad11099ccdb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@mason-sharp
mason-sharp requested a review from rasifr August 10, 2026 05:00
@mason-sharp
mason-sharp merged commit afabcf8 into v5_STABLE Aug 12, 2026
6 checks passed
@mason-sharp
mason-sharp deleted the spoc-645 branch August 12, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants