Skip to content

Reset statements before caching to release locks - #80

Merged
vinzenz merged 1 commit into
masterfrom
t3code/address-reported-bug
Sep 13, 2026
Merged

vinzenz merged 1 commit into
masterfrom
t3code/address-reported-bug

Conversation

@vinzenz

@vinzenz vinzenz commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Reset and clear bindings before retaining statements in the cache.
  • Finalize statements whose reset reports an error instead of caching them.
  • Add regression coverage for released read locks, cursor reuse, bindings, and failed statements.
  • Remove the CodeRabbit badge from the README.

Testing

  • Added statement cache regression tests covering mid-cursor returns, early range exits, unfinished aggregates, reuse, bindings, and step failures.
  • Not run.

Summary by CodeRabbit

  • Bug Fixes

    • Improved SQLite statement handling to release read locks when operations stop before completion, preventing them from blocking writes.
    • Ensured cached statements restart cleanly and do not retain previous parameter bindings.
    • Statements that fail during execution are no longer retained for reuse.
  • Tests

    • Added regression coverage for interrupted queries, unfinished aggregates, binding cleanup, statement reuse, and execution failures.

- Clear bindings before retaining statements
- Finalize statements that fail during reset
- Add regression tests for cursor locks and cache reuse
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 4007ced2-43c0-4519-a2f8-bf111a7b90f1

📥 Commits

Reviewing files that changed from the base of the PR and between d8a2ba1 and 28ea72e.

📒 Files selected for processing (3)
  • include/sqlite/statement_cache.hpp
  • src/sqlite/statement_cache.cpp
  • tests/test_statement_cache.cpp
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/address-reported-bug

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.

@vinzenz

vinzenz commented Sep 10, 2026

Copy link
Copy Markdown
Owner Author

@claude review this

@vinzenz

vinzenz commented Sep 12, 2026

Copy link
Copy Markdown
Owner Author

@deslopify

@vinzenz

vinzenz commented Sep 13, 2026

Copy link
Copy Markdown
Owner Author

@deslopify rerun

@vinzenz
vinzenz merged commit 348d5c6 into master Sep 13, 2026
19 of 20 checks passed
@deslopify

deslopify Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review request received. The standard review is completed. Use @deslopify rerun to request a new attempt once this one finishes.

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.

1 participant