reading profiling status disables profiling

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.10.1
    • Component/s: None
    • None
    • Environment:
      linux 64 bit with --keyfile option
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When reading the profiling status, profiling will be disabled afterwards.
      Reproduce:
      Turn on profiling: db.setProfilingLevel(1,3000)
      PRIMARY> db.setProfilingLevel(1,3000)

      { "was" : 1, "slowms" : 3000, "ok" : 1 }

      Execute Java code to read out status:

      final CommandResult cr = offerStoreDb.command("profile");
      

      or even:

      DBObject command = new BasicDBObject();
      command.put("profile", "1");//may be -1 as well
      final CommandResult cr = offerStoreDb.command(command);
      

      When re-checking in console, profiling is OFF:
      PRIMARY> db.getProfilingLevel()
      0

            Assignee:
            Unassigned
            Reporter:
            Kay Agahd
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: