FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix DisableRecording carrying over to later pooled leases by SimonCropp · Pull Request #1072 · VerifyTests/Verify.EntityFramework · GitHub

Fix DisableRecording carrying over to later pooled leases - #1072

Merged
SimonCropp merged 1 commit into
mainfrom
fix-disable-recording-pooling
Sep 23, 2026
Merged

SimonCropp merged 1 commit into
mainfrom
fix-disable-recording-pooling

Conversation

Copy link
Copy Markdown
Member

DisableRecording stored ContextId.InstanceId, which a pooled context keeps when it is returned to the pool, so recording stayed disabled for every later lease of that instance. It now stores the whole ContextId, which includes the lease.

The ids are also held in a ConcurrentDictionary instead of a ConcurrentBag. ConcurrentBag.Contains copies the bag under a lock, and it ran for every command: about 43 us per command once 1,000 contexts had been disabled.

DisableRecording stored ContextId.InstanceId, which a pooled context keeps when
it is returned to the pool, so recording stayed disabled for every later lease
of that instance. It now stores the whole ContextId, which includes the lease.

The ids are also held in a ConcurrentDictionary instead of a ConcurrentBag.
ConcurrentBag.Contains copies the bag under a lock, and it ran for every
command: about 43 us per command once 1,000 contexts had been disabled.
SimonCropp added this to the 15.5.0 milestone Sep 23, 2026
SimonCropp merged commit 331eea1 into main Sep 23, 2026
5 of 6 checks passed
SimonCropp deleted the fix-disable-recording-pooling branch September 23, 2026 01:21
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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL