Update fuzzer must not use upsert except when there is only 0 or 1 matching document

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The cross-version update fuzzer can fail because it assumes upsert is deterministic, but it is not. This occurred in a nightly Evergreen run when an upsert used the $inc operation, which succeeds on numeric values but fails on objects, arrays, and strings with error code 14. The problem arises because any upsert with multiple matching documents will update a random one of them. (This is not intentionally randomized, but MQL does not provide any guarantee as to which matching doc will be updated.) Thus a doc that started with a numeric value in, e.g. "obj.num" may or may not still have a numeric value there after an upsert has updated a random document's "obj.num" field. Subsequent upserts therefore cannot know whether the operation will be supported or not on whichever document they (possibly also nondeterministically) choose to update.

            Assignee:
            Unassigned
            Reporter:
            Kevin Cherkauer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: