[SERVER-14219] failed index creation results in a collection which exists on the master but not slave Created: 10/Jun/14  Updated: 08/Sep/14  Resolved: 20/Aug/14

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 2.7.1
Fix Version/s: 2.7.6

Type: Bug Priority: Major - P3
Reporter: Greg Studer Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File bad_index_create.js    
Issue Links:
Tested
Operating System: ALL
Steps To Reproduce:

Script below causes an error using a bad index descriptor, which creates the collection on the master but not the slave.

Participants:

 Description   

A bad index creation attempt at least in some cases creates a collection on a master host - this collection never seems to be replicated to a slave, however.

Only tested against 2.7.1.

Unsure if this also applies to replica sets, found while investigating a _small_oplog failure.



 Comments   
Comment by Githook User [ 20/Aug/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-14219 logOp implicit collection creation

This patch only logs the creation of collections that will not be deleted on
operation failure. This fixes a bug where the collection would be created on
master, but if the operation failed, the slaves would not get the logOp that
implicitly created the collection leading them to differ from the master.
Branch: master
https://github.com/mongodb/mongo/commit/081f11c248433f74806b7508555b212bc4ff0164

Comment by hari.khalsa@10gen.com [ 15/Jul/14 ]

Not sure if this is best handed to you or milkie

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