[SERVER-31843] system.profile in non-local dbs will trigger a 3.4 downgrade prior to rs initiate Created: 06/Nov/17  Updated: 06/Dec/22  Resolved: 19/Aug/19

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

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Operating System: ALL
Steps To Reproduce:

1. Start mongod
./mongod --replSet foo --bind_ip 0.0.0.0
2. Start mongo
./mongo
3. Create test.system.profile
db.setProfilingLevel(2)
4. Shut down mongod
use admin
db.shutdownServer()
5. Restart mongod
The log shows this message and aborts startup:

** IMPORTANT: There is no feature compatibility document. A 3.4 binary must be used.
** 

Participants:

 Description   

A system.profile collection can be created in any replicated database prior to an initiation of a replica set. mongod startup code currently assumes that if any non-local databases exist, they must have been created with 3.4, but this is not true for system.profile.

By creating a system.profile collection in a replicated database and then restarting mongod, the startup code will downgrade the data files to 3.4 and refuse to start.



 Comments   
Comment by Eric Milkie [ 14/Nov/17 ]

This ticket only involves data files for a new replica set for which the replSetInitiate command has not yet been run. I don’t see a use case for upgrading a mongod running on data files for an uninitiated replica set. Is that really your situation?

Comment by Alessandro Gherardi [ 14/Nov/17 ]

I've run into the same problem when upgrading my binaries from 3.6-rc0 to 3.6-rc3. mongod 3.6-rc3 won't start and writes the message in the description to the log.

Is there a way to recover?

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