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

findAndModify not captured by Profiler

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Steps To Reproduce:
      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()
    • Sprint:
      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".

        Issue Links

          Activity

          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

          Message: SERVER-21772 remove dead method CurOp::setDbProfileLevel
          Branch: master
          https://github.com/mongodb/mongo/commit/840252b2676ff42303acb7e1ebb7887a2e924d78

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'} Message: SERVER-21772 remove dead method CurOp::setDbProfileLevel Branch: master https://github.com/mongodb/mongo/commit/840252b2676ff42303acb7e1ebb7887a2e924d78
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

          Message: SERVER-21772 correctly profile and log findAndModify operations
          Branch: master
          https://github.com/mongodb/mongo/commit/95c072ee0a3efd3ecf188ed508d95fe236b05d48

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'} Message: SERVER-21772 correctly profile and log findAndModify operations Branch: master https://github.com/mongodb/mongo/commit/95c072ee0a3efd3ecf188ed508d95fe236b05d48
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

          Message: SERVER-21772 remove dead method CurOp::setDbProfileLevel

          (cherry picked from commit 840252b2676ff42303acb7e1ebb7887a2e924d78)
          Branch: v3.2
          https://github.com/mongodb/mongo/commit/cc9e9ae59d089d3b84a2ed117950d6e195360cf3

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'} Message: SERVER-21772 remove dead method CurOp::setDbProfileLevel (cherry picked from commit 840252b2676ff42303acb7e1ebb7887a2e924d78) Branch: v3.2 https://github.com/mongodb/mongo/commit/cc9e9ae59d089d3b84a2ed117950d6e195360cf3
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

          Message: SERVER-21772 correctly profile and log findAndModify operations

          (cherry picked from commit 95c072ee0a3efd3ecf188ed508d95fe236b05d48)
          Branch: v3.2
          https://github.com/mongodb/mongo/commit/a014a946bdea5013883bff963ae6fae9fe39e2a7

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'} Message: SERVER-21772 correctly profile and log findAndModify operations (cherry picked from commit 95c072ee0a3efd3ecf188ed508d95fe236b05d48) Branch: v3.2 https://github.com/mongodb/mongo/commit/a014a946bdea5013883bff963ae6fae9fe39e2a7

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                  Agile