Guard AutoDDL processing with transaction when needed - #562
Conversation
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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
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.
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.