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

findAndModify not captured by Profiler

    XMLWordPrintableJSON

Details

    • Fully Compatible
    • ALL
    • Hide

      db.asdf.drop();
      db.asdf.insert({a: true, b: 2});
      db.setProfilingLevel(0);
      db.system.profile.drop();
      db.setProfilingLevel(2);
      db.asdf.findAndModify({query: {a: true, b: 2}, update: {$set: {c: 3}}});
      db.setProfilingLevel(0);
      db.system.profile.find()
      

      Show
      db.asdf.drop(); db.asdf.insert({a: true, b: 2}); db.setProfilingLevel(0); db.system.profile.drop(); db.setProfilingLevel(2); db.asdf.findAndModify({query: {a: true, b: 2}, update: {$set: {c: 3}}}); db.setProfilingLevel(0); db.system.profile.find()
    • QuInt D (12/14/15), QuInt E (01/11/16)

    Description

      findAndModify operations which do not exceed the slowms threshold will always be absent from the system.profile collection.

      This is happening because FindAndModify::run() is failing to call CurOp::enter_inlock(). The enter_inlock is responsible for raising the profiling level associated with the operation, based on the database profiling level. Failing to call it means that the operation's profiling level is erroneously left as "0".

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            stephen.lee Stephen Lee
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: