Decompress query for logline#2682
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f8e4457d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else { | ||
| if (_uncommittedQuery.size()) { | ||
| SINFO("Rolling back transaction: " << _uncommittedQuery.substr(0, 100)); | ||
| SINFO("Rolling back transaction: " << BedrockPlugin_Compression::decompress(_uncommittedQuery).substr(0, 100)); |
There was a problem hiding this comment.
Bound work when logging the rollback prefix
For transactions containing large expanded SQL or many statements, this computes an entire copy of an uncompressed _uncommittedQuery, or fully decompresses a prepared query, before discarding everything after 100 bytes. A rollback after prepare() performs this allocation while still holding commitLock, so memory pressure can throw before the SQLite rollback and mutex release, while ordinary large rollbacks unnecessarily block other commits. Preserve a bounded plaintext prefix before compression or use a decompression path that stops after the log limit.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Preserve a bounded plaintext prefix before compression
Can we do this?
Details
Fixed Issues
Fixes GH_LINK
Tests
Internal Testing Reminder: when changing bedrock, please compile auth against your new changes