[CSHARP-3716] Enable retryable writes tests on sharded cluster Created: 24/Jun/21  Updated: 28/Oct/23  Resolved: 10/Aug/21

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 2.14.0

Type: Improvement Priority: Unknown
Reporter: Dmitry Lukyanov (Inactive) Assignee: Dmitry Lukyanov (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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
}



 Comments   
Comment by Githook User [ 10/Aug/21 ]

Author:

{'name': 'Dmitry Lukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}

Message: CSHARP-3716: Enable retryable writes tests on sharded cluster. (#590)

CSHARP-3716: Enable retryable writes tests on sharded cluster.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/a3d1f3194eaa700487cef37b3369afe1779302e9

Generated at Wed Feb 07 21:46:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.