[SERVER-26603] getLocalOplogCollection can overwrite CurOp namespace for user operations Created: 12/Oct/16  Updated: 19/Nov/16  Resolved: 13/Oct/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.4.0-rc1

Type: Bug Priority: Major - P3
Reporter: James Wahlin Assignee: James Wahlin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

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


 Comments   
Comment by Githook User [ 13/Oct/16 ]

Author:

{u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}

Message: SERVER-26603 getLocalOplogCollection overwrite of CurOp namespace
Branch: master
https://github.com/mongodb/mongo/commit/3e13f3c3a984b31b7977e08a5da6c4e91918d5d4

Generated at Thu Feb 08 04:12:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.