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

getLocalOplogCollection can overwrite CurOp namespace for user operations

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.0-rc1
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • Hide
      python buildscripts/resmoke.py --executor=core_small_oplog_rs_initsync_static  jstests/core/repair_database.js jstests/core/profile_insert.js
      
      Show
      python buildscripts/resmoke.py --executor=core_small_oplog_rs_initsync_static jstests/core/repair_database.js jstests/core/profile_insert.js
    • Integration 2016-10-31
    • 0

      It is possible for getLocalOplogCollection in oplog.cpp to overwrite the CurOp namespace for a user operation. This can lead to incorrect namespace in diagnostics for the given operation as well as writing of any system.profile entry to the local rather than the user database.

      This occurs when:

      1. A user operation triggers collection creation
      2. The oplog.cpp _localOplogCollection Collection* has not been set to point to the local.oplog.rs collection
      3. OldClientContext creation (used to obtain the oplog.rs handle) sets the OperationContext to the local.oplog.rs namespace (via CurOp::enter_inlock() call).

            Assignee:
            james.wahlin@mongodb.com James Wahlin
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: