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

`renameCollection` should handle write conflicts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.3.12
    • Fix Version/s: 3.2.14, 3.4.7, 3.5.6
    • Component/s: None
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.4, v3.2
    • Steps To Reproduce:
      Hide

      Unfortunately I don't have a small test case that reproduces the error, but a write conflict can be reproduced by running the `agg_match.js` FSM concurrency test with an increased write conflict activation probability:

      1. Change `jstests/concurrency/fsm_all.js` to call `runWorkLoadsSerially` on an array only containing "jstests/concurrency/fsm_workloads/agg_match.js" (instead of `ls(dir)`

      2. In the function `setupWorkload` in `jstests/concurrency/fsm_libs/runner.js`, add the line `assert.commandWorked(myDB.adminCommand({configureFailPoint: "WTWriteConflictException", mode: {activationProbability: 0.0005}}));` (right after the declaration of the variable `myDB`)
      3. Run resmoke with `--repeat=10 --executor=conncurrency jstests/concurrency/fsm_all.js`. A write conflict will occur within the first five or so iterations.

      Show
      Unfortunately I don't have a small test case that reproduces the error, but a write conflict can be reproduced by running the `agg_match.js` FSM concurrency test with an increased write conflict activation probability: 1. Change `jstests/concurrency/fsm_all.js` to call `runWorkLoadsSerially` on an array only containing "jstests/concurrency/fsm_workloads/agg_match.js" (instead of `ls(dir)` 2. In the function `setupWorkload` in `jstests/concurrency/fsm_libs/runner.js`, add the line `assert.commandWorked(myDB.adminCommand({configureFailPoint: "WTWriteConflictException", mode: {activationProbability: 0.0005}}));` (right after the declaration of the variable `myDB`) 3. Run resmoke with `--repeat=10 --executor=conncurrency jstests/concurrency/fsm_all.js`. A write conflict will occur within the first five or so iterations.
    • Sprint:
      Storage 2017-03-27, Storage 2017-04-17
    • Linked BF Score:
      0

      Description

      renameCollection (in "src/mongo/db/catalog/rename_collection.cpp") does not currently handle write conflicts. To do this, a retry loop needs to be added to ensure that that command succeeds.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: