[CSHARP-2226] Unable to send replSetInitiate to uninitiated replica set using direct connection Created: 26/Mar/18  Updated: 28/Oct/23  Resolved: 29/Mar/18

Status: Closed
Project: C# Driver
Component/s: Command Operations
Affects Version/s: 2.5
Fix Version/s: 2.5.1

Type: Bug Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by CSHARP-2245 Driver version 2.5.0 is failing to co... Closed

 Description   

The following throws a timeout exception on the call to RunCommand starting with version 2.5.0:

var client = new MongoClient("mongodb://hostname/?connect=direct");
 
var adminDatabase = client.GetDatabase("admin");
var config = new BsonDocument
{
    { "_id", "rs" },
    { "members", new BsonArray
        {
            new BsonDocument
            {
                { "_id", 0 },
                { "host", "hostname:27017" }
            }
        }
    }
};
var command = new BsonDocument("replSetInitiate", config);
var result = adminDatabase.RunCommand<BsonDocument>(command);

The problem is related to implicit sessions.



 Comments   
Comment by Githook User [ 29/Mar/18 ]

Author:

{'email': 'robert@robertstam.org', 'name': 'rstam', 'username': 'rstam'}

Message: CSHARP-2226: Unable to send replSetInitiate to uninitiated replica set using direct connection
Branch: v2.5.x
https://github.com/mongodb/mongo-csharp-driver/commit/64bce88ce60ee654c2d157f5e9ab8d566840a100

Comment by Githook User [ 29/Mar/18 ]

Author:

{'email': 'robert@robertstam.org', 'name': 'rstam', 'username': 'rstam'}

Message: CSHARP-2226: Unable to send replSetInitiate to uninitiated replica set using direct connection
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/b85eed60c2b2479ece1cd5b29bbf365a7537cc9c

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