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

Turning on the profiler inhibits initiating a replica set

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 3.6.0-rc4
    • Affects Version/s: 3.6.0-rc2
    • Component/s: Replication
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Hide

      1. Start mongod
      ./mongod --replSet foo --bind_ip 0.0.0.0

      2. Start mongo
      db.setProfilingLevel(2)
      rs.initiate()

      This will result in a failure of the command with:
      "Not primary while setting collection options on test.system.profile"
      (which is confusing because this is the output of the collMod command to set a UUID – this is not indicated in the error message)

      Show
      1. Start mongod ./mongod --replSet foo --bind_ip 0.0.0.0 2. Start mongo db.setProfilingLevel(2) rs.initiate() This will result in a failure of the command with: "Not primary while setting collection options on test.system.profile" (which is confusing because this is the output of the collMod command to set a UUID – this is not indicated in the error message)
    • Storage 2017-11-13
    • 0

      Turning on the profiler on a replicated database writes a new system.profile collection to the database, even if initiate has not yet run.

      Subsequently, if you then run initiate, it will fail because it will attempt to assign a UUID to the system.profile collection, but this is prohibited because the node is not yet a PRIMARY.

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: