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

Shutting down with prepared transaction can invariant during collection validation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.0-rc3, 4.3.1
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL
    • Backport Requested:
      v4.2
    • Steps To Reproduce:
      Hide

      --- a/jstests/replsets/shutdown_with_prepared_transaction.js
      +++ b/jstests/replsets/shutdown_with_prepared_transaction.js
      @@ -34,5 +34,5 @@
           jsTestLog("Shutting down the set with the transaction still in prepare state");
           // Skip validation during ReplSetTest cleanup since validate() will block behind the prepared
           // transaction's locks when trying to take a collection X lock.
      -    replTest.stopSet(null /*signal*/, false /*forRestart*/, {skipValidation: true});
      +    replTest.stopSet(null /*signal*/, false /*forRestart*/);
       }());
      

      Show
      --- a/jstests/replsets/shutdown_with_prepared_transaction.js +++ b/jstests/replsets/shutdown_with_prepared_transaction.js @@ -34,5 +34,5 @@ jsTestLog( "Shutting down the set with the transaction still in prepare state" ); // Skip validation during ReplSetTest cleanup since validate() will block behind the prepared // transaction's locks when trying to take a collection X lock. - replTest.stopSet( null /*signal*/ , false /*forRestart*/ , {skipValidation: true }); + replTest.stopSet( null /*signal*/ , false /*forRestart*/ ); }());
    • Sprint:
      Repl 2019-07-15
    • Linked BF Score:
      15

      Description

      If a test shuts down a node without committing or aborting a prepared transaction, collection validation will run into a prepare conflict. Previously, this would result in a hang. After SERVER-40936, this results in an invariant failure. While this is easy to avoid, it contradicts our general philosophy that we should not be able to hit invariants in tests. It might also be worth investigating if there are any other dangers that might come of this.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lingzhi.deng Lingzhi Deng
              Reporter:
              vesselina.ratcheva Vesselina Ratcheva
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: