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

getLocalOplogCollection can overwrite CurOp namespace for user operations

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0-rc1
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      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
    • Sprint:
      Integration 2016-10-31
    • Linked BF Score:
      0

      Description

      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).

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: