[SERVER-18112] mongod replicates operations on system.profile collection Created: 17/Apr/15  Updated: 12/Jun/15  Resolved: 19/Apr/15

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

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: Daniel Pasette (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-18107 Crash on mongorestore with system.pro... Closed
Related
related to SERVER-18111 mongod allows user inserts into syste... Closed
related to SERVER-18962 Fatal assertion on profiling-enabled ... Closed
Operating System: ALL
Participants:

 Description   

mongod replicates operations on the system.profile collection, which cannot be applied by secondaries.

Reproduce with the following shell script:

var rst = new ReplSetTest({nodes: 2});
rst.startSet();
rst.initiate();
assert.writeOK(rst.getPrimary().getDB("test").system.profile.insert({}));
rst.awaitReplication();

When run against mongod version 3.0.2, the secondary trips the following fatal assertion:

 m31001| 2015-04-17T19:27:57.786-0400 E REPL     [repl writer worker 15] writer worker caught exception:  :: caused by :: 10156 cannot update system collection: test.system.profile q: { _id: ObjectId('553196fbbd29dfa216a257c4') } u: { _id: ObjectId('553196fbbd29dfa216a257c4') } on: { ts: Timestamp 1429313275000|2, h: -5983586001124027387, v: 2, op: "i", ns: "test.system.profile", o: { _id: ObjectId('553196fbbd29dfa216a257c4') } }
 m31001| 2015-04-17T19:27:57.786-0400 I -        [repl writer worker 15] Fatal Assertion 16360
 m31001| 2015-04-17T19:27:57.786-0400 I -        [repl writer worker 15]
 m31001|
 m31001| ***aborting after fassert() failure

This issue has been fixed for 3.1.2 by 1725d76f as a side-effect of SERVER-17573 work. However, a direct fix should be made on the v3.0 and v2.6 branches.



 Comments   
Comment by Daniel Pasette (Inactive) [ 19/Apr/15 ]

I agree with Scott here, we definitely need to fix the issue with mongorestore (most urgent) and direct insert into profile collections (slightly less urgent), but don't think it's worth making a backport to v2.6 and v3.0.

Comment by Scott Hernandez (Inactive) [ 18/Apr/15 ]

This seems like a side-effect of allowing inserts into system.profile, not something which is a bug. While we did cleanup things with the observer work I'm not sure we need to backport that but simply fix the underlying bug of allowing inserts into system.profile.

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