Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15930

Consider skipping yield inside WriteUnitOfWork instead of triggering fatal assertion

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Concurrency
    • None
    • Fully Compatible

      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.

            Assignee:
            rassi J Rassi
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: