Skip to content

fix(core): fix misleading table locked error appearing before write failure#6152

Merged
bluestreak01 merged 2 commits intomasterfrom
fix-table-locked-on-distressed
Sep 24, 2025
Merged

fix(core): fix misleading table locked error appearing before write failure#6152
bluestreak01 merged 2 commits intomasterfrom
fix-table-locked-on-distressed

Conversation

@ideoma
Copy link
Copy Markdown
Collaborator

@ideoma ideoma commented Sep 17, 2025

Fixes an error similar to this one

2025-09-16T12:14:39.415075Z I i.q.c.TableWriter open 'dbRoot2/testManyTransactions_0~12'
2025-09-16T12:14:39.415138Z E i.q.c.TableUtils cannot lock '/tmp/junit16397888088311752779/dbRoot2/db/testManyTransactions_0~12.lock' [errno=11, fd=1840393572245]
2025-09-16T12:14:39.415259Z I i.q.c.TableWriter closed [table=dbRoot2/testManyTransactions_0~12]
2025-09-16T12:14:39.415269Z C i.q.c.p.WriterPool could not open [table=dbRoot2/testManyTransactions_0~12, thread=3568, msg=cannot lock table: /tmp/junit16397888088311752779/dbRoot2/db/testManyTransactions_0~12, errno=11]
2025-09-16T12:14:39.415321Z C i.q.c.w.ApplyWal2TableJob job failed, table suspended [table=dbRoot2/testManyTransactions_0~12, error=
 io.questdb.cairo.CairoException: [11] cannot lock table: /tmp/junit16397888088311752779/dbRoot2/db/testManyTransactions_0~12
2025-09-16T12:14:39.420604Z I i.q.c.TableWriter closed [table=dbRoot2/testManyTransactions_0~12]
2025-09-16T12:14:39.420622Z C i.q.c.w.ApplyWal2TableJob job failed, table suspended [table=dbRoot2/testManyTransactions_0~12, seqTxn=85, error=
io.questdb.cairo.CairoException: [0] could not apply structure change from WAL to table. WAL metadata change does not exist [structureVersion=83]

Here, cannot lock ... errno=11 is the result of a race that creates 2 TableWriter objects in WriterPool because of a failure in the ApplyWal job that is logged as could not apply structure change from WAL to table. WAL metadata change does not exist [structureVersion=83]

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 17, 2025

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.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-table-locked-on-distressed

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.

@glasstiger
Copy link
Copy Markdown
Contributor

[PR Coverage check]

😍 pass : 1 / 1 (100.00%)

file detail

path covered line new line coverage
🔵 io/questdb/cairo/pool/WriterPool.java 1 1 100.00%

@bluestreak01 bluestreak01 merged commit e7e4198 into master Sep 24, 2025
35 checks passed
@bluestreak01 bluestreak01 deleted the fix-table-locked-on-distressed branch September 24, 2025 12:51
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