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

ReplicaSet configuration is not yet initialized when the server start to accept connections.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.2
    • Affects Version/s: 1.6.3
    • Component/s: Replication
    • None
    • Environment:
      Linux 2.6.34.2 with Ubuntu Lucid Lynx userland, mongodb package from 10gen on a dual core 64bits EC2 server. (m1.large)
    • Linux

      Given an empty mongodb server launched with --replSet.

      If you immediately run rs.initiate(); when the server start to accept connections on port 27017 the command fails.

      A quick look over the source code show that at this time ReplSet::startupStatus is different from ReplSet::EMPTYCONFIG as it should be.

      If you wait 5 seconds after the server start to accept connections to run the command then it succeed.

      I expect the command to succeed as soon as the server start to accept connections. It breaks automation scripts.

      Please find attached the console output.

        1. typescript.time
          0.2 kB
        2. typescript
          3 kB

            Assignee:
            kristina Kristina Chodorow (Inactive)
            Reporter:
            kalessin Louis Opter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: