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

Unable to send replSetInitiate to uninitiated replica set using direct connection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5.1
    • Component/s: Command Operations
    • Labels:
      None

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: