Skip to content

fix(sql): fix table and name-lock leak on CREATE TABLE AS SELECT failure#6763

Merged
bluestreak01 merged 3 commits intomasterfrom
cleanup_temp_table_export_failed
Feb 11, 2026
Merged

fix(sql): fix table and name-lock leak on CREATE TABLE AS SELECT failure#6763
bluestreak01 merged 3 commits intomasterfrom
cleanup_temp_table_export_failed

Conversation

@kafka1991
Copy link
Collaborator

@kafka1991 kafka1991 commented Feb 9, 2026

  • When CREATE TABLE ... AS (SELECT ...) fails during data population with a non-Cairo exception, the partially created table and its name lock were not cleaned up. This also affects COPY parquet export, which uses temp tables internally.
  • Added fallback cleanup in COPY parquet export to match the existing HTTP export pattern.

@kafka1991 kafka1991 changed the title fix(parquet): cleanup temp table if insert to temp table failed fix(parquet): fix orphaned temp table in COPY export when table population fails Feb 9, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 9, 2026

Important

Review skipped

Auto reviews are disabled on this repository. 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.

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
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cleanup_temp_table_export_failed

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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 and usage tips.

@kafka1991 kafka1991 changed the title fix(parquet): fix orphaned temp table in COPY export when table population fails fix(sql): fix orphaned temp table in COPY export when table population fails Feb 9, 2026
@kafka1991 kafka1991 changed the title fix(sql): fix orphaned temp table in COPY export when table population fails fix(sql): fix table and name-lock leak on CREATE TABLE AS SELECT failure Feb 9, 2026
@glasstiger
Copy link
Contributor

[PR Coverage check]

😍 pass : 16 / 17 (94.12%)

file detail

path covered line new line coverage
🔵 io/questdb/griffin/SqlCompilerImpl.java 10 11 90.91%
🔵 io/questdb/cutlass/parquet/SQLSerialParquetExporter.java 6 6 100.00%

@bluestreak01 bluestreak01 merged commit 57766f3 into master Feb 11, 2026
44 checks passed
@bluestreak01 bluestreak01 deleted the cleanup_temp_table_export_failed branch February 11, 2026 18:00
maciulis pushed a commit to maciulis/questdb that referenced this pull request Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants