-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: harden the check for when leaf txn can used
This commit refactors the code where we determine whether we have to make a leaf txn for the local flow (which is the case when we either parallelize scans or use the streamer API) to be "stronger". We recently saw a nil-pointer error when trying to create a streamer (the txn was nil), and the only case I could see this happening was that if `makeLeaf` function returned nil which can occur if the original txn was nil. I still don't see how that could happen (and neither could I reproduce it), but this commit makes the code more bullet-proof so that we ensure that `LeafTxnInputState` is non-nil when we expect to have concurrency. Release note: None
- Loading branch information
1 parent
9e47dc9
commit 0d340db
Showing
1 changed file
with
49 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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