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.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.6.3
    • Fix Version/s: 1.7.2
    • Component/s: Replication
    • Labels:
      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)
    • Operating System:
      Linux

      Description

      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.

        Attachments

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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: