[SERVER-15930] Consider skipping yield inside WriteUnitOfWork instead of triggering fatal assertion Created: 03/Nov/14  Updated: 22/Apr/15  Resolved: 22/Apr/15

Status: Closed
Project: Core Server
Component/s: Concurrency
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: J Rassi Assignee: J Rassi
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-15541 Re-enable yielding Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

The yielding code currently trips an invariant if a yield is attempted inside a WriteUnitOfWork. We could consider relaxing this to silently skip the yield in non-debug builds, and replacing it with a debug-only fatal assertion in debug builds.

The reason for making this change would be to prevent the invariant from getting tripped in the wild (which would turn the correctness issue of crashing into the performance issue of not yielding). Reasons not to make this change would be to help catch such bugs earlier in development.


Generated at Thu Feb 08 03:39:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.