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

No primary, insert through mongoS hangs for 15 seconds before failing

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.10
    • Component/s: None
    • Labels:
      None
    • ALL
    • Hide
      • Setup a Mongo 3.2.10 cluster with CSRS and 1 replicaset consisting of a single mongoD
      • Create a sharded collection
      • Connect to the mongoD and run db.getSiblingDB("admin").runCommand( {replSetStepDown: 600, force: true}

        )

      • Connect to mongoS
      • Set rs.slaveOk()
      • Try to insert a document in the collection
      • The insert hangs for about 15 seconds then fails with "could not contact primary for replica set"
      Show
      Setup a Mongo 3.2.10 cluster with CSRS and 1 replicaset consisting of a single mongoD Create a sharded collection Connect to the mongoD and run db.getSiblingDB("admin").runCommand( {replSetStepDown: 600, force: true} ) Connect to mongoS Set rs.slaveOk() Try to insert a document in the collection The insert hangs for about 15 seconds then fails with "could not contact primary for replica set"

      In Mongo 3.2.10, when trying to insert a new document via mongoS and the underlying replicaset has no primary, the write hangs for about 15 seconds before failing with a "could not contact primary for replica set" error.

      The error is expected. What's not expected is that it takes 15 seconds for mongoS to return that error. In Mongo 3.0.4, the insert fails immediately.

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            alessandro.gherardi@yahoo.com Alessandro Gherardi
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: