Repository navigation
sqldb: prevent pool access from transaction callbacks - #11347
Open
ziggie1984 wants to merge 2 commits into
Open
ziggie1984 wants to merge 2 commits into
ziggie1984 wants to merge 2 commits into
Conversation
Fetch settled AMP sub-invoices through the query object supplied to the transaction callback. Using the store's pool here can wait for a second connection while the transaction retains the first one, deadlocking a constrained pool. Add a single-connection SQLite regression test so any pool access from this transaction fails instead of going unnoticed.
Add the txscope analysis plugin to prevent ExecTx callbacks from accessing the executor that opened their transaction. Detect direct uses, alias chains, conversions, helper arguments, and nested transactions while permitting calls through a distinct database. Require inline callbacks so the check cannot be bypassed through a named function, and enable the analyzer in the repository lint configuration.
🟠 PR Severity: HIGH
🟠 High (1 file)
🟡 Medium (1 file)
🟢 Low (6 files)
AnalysisThe highest-severity file is To override, add a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Description
Fixes #11346 by using the transaction-bound query object in
InvoicesSettledSince, avoiding a second pool connection from insideExecTx.Adds the
txscopeanalyzer to prevent transaction callbacks from accessingtheir originating executor, while still allowing access to a different DB.
Steps to Test