Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3716

Enable retryable writes tests on sharded cluster

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.14.0
    • Affects Version/s: None
    • Component/s: None
    • None

      This condition looks false-positive for a sharded cluster: https://github.com/mongodb/mongo-csharp-driver/blob/master/tests/MongoDB.Driver.Tests/Specifications/retryable-writes/RetryableWriteTestRunner.cs#L59 , because

      db.serverStatus()["storageEngine"]
      

      will be always null for mongos, so since in our logic mmapv1 is a default value, we will always skip all retryable writes spec tests on sharded. Possible solution is to connect to a shard directly, in this case the server will return result as expected:

      MongoDB Enterprise shard01:PRIMARY> db.serverStatus()["storageEngine"]
      {
              "name" : "wiredTiger",
              "supportsCommittedReads" : true,
              "oldestRequiredTimestampForCrashRecovery" : Timestamp(1624556687, 1),
              "supportsPendingDrops" : true,
              "dropPendingIdents" : NumberLong(0),
              "supportsSnapshotReadConcern" : true,
              "readOnly" : false,
              "persistent" : true,
              "backupCursorOpen" : false,
              "supportsResumableIndexBuilds" : true
      }
      

            Assignee:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Reporter:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: