[SERVER-14514] disallow convertToCapped on system collections Created: 09/Jul/14  Updated: 19/Jun/15  Resolved: 17/Jun/15

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

Type: Bug Priority: Major - P3
Reporter: Charlie Page Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-18962 Fatal assertion on profiling-enabled ... Closed
Related
Operating System: ALL
Steps To Reproduce:

Connect to primary.

use test
db.setProfilingLevel(1)
db.setProfilingLevel(0)
db.runCommand({convertToCapped: "system.profile", size:100000})

Participants:

 Description   

The system.profile collection shouldn't have anything replicated against it.

Oplog output:

{
  "h": NumberLong("-8100133880159272942"),
  "ns": "test.$cmd",
  "o": {
    "convertToCapped": "system.profile",
    "size": 100000
  },
  "op": "c",
  "ts": Timestamp(1404932023, 1),
  "v": 2
}



 Comments   
Comment by Charlie Page [ 10/Jul/14 ]

Rather than mask commands, what about masking certain collections from replication (that will catch all commands in the future too).

Comment by Charlie Page [ 09/Jul/14 ]

Sorry, that was a paste from mongoD starting back up and 2.6.1. 2.6.3 says "source collection test.system.profile does not exist", so I'm going to remove that part.

Comment by Eric Milkie [ 09/Jul/14 ]

I'm pretty sure the log you are claiming is from the primary is from a secondary, though.

Comment by Charlie Page [ 09/Jul/14 ]

The collection didn't exist on the secondary on any of these tests.

I mean that running

use test
db.runCommand({convertToCapped: "system.profile", size:100000})

on a fresh primary in a replica set crashes the primary.

Comment by Eric Milkie [ 09/Jul/14 ]

In your description, did you mean "On the secondary if collection doesn't already exist:"?

Generated at Thu Feb 08 03:35:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.