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

[SBE] Add tests for cases where execution continues after saveState() throws a WriteConflictException

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-101591 broke things for the case where execution continues after saveState() throws a WriteConflictException, but none of the tests in the required build variants caught this problem. "jstestfuzz_concurrent_replication_write_conflicts" caught the problem (see BF-37007), but "jstestfuzz_concurrent_replication_write_conflicts" is a non-deterministic fuzzer-style test that doesn't run in any of the required build variants.

      Unfortunately, it seems like we lack any deterministic non-fuzzer tests that would catch this problem.

      As part of this ticket, we should:

      • Make unit tests for PlanYieldPolicy
      • Add more unit tests to cover scenarios where we call saveState()/restoreState() on SBE plan stage trees
      • Add unit tests that cover the case where execution continues after saveState() throws a WriteConflict exception
      • Verify that these new unit tests would have caught the bug introduced by SERVER-101591

            Assignee:
            Unassigned Unassigned
            Reporter:
            andrew.paroski@mongodb.com Drew Paroski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: