[SERVER-24024] SERVER-23299 patch does not respect queryableBackupMode flag Created: 03/May/16  Updated: 25/Jan/17  Resolved: 20/May/16

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

Type: Bug Priority: Minor - P4
Reporter: Daniel Gottlieb (Inactive) Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-23299 Remove temp flag on all collections i... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 14 (05/13/16), Sharding 15 (06/03/16)
Participants:

 Description   

The offending line: https://github.com/mongodb/mongo/blob/r3.3.5/src/mongo/db/db.cpp#L322

2016-05-02T12:07:06.015-0400 D STORAGE  [initandlisten] enter repairDatabases (to check pdfile version #)
2016-05-02T12:07:06.016-0400 D -        [initandlisten] User Assertion: 20:Cannot create a database in read-only mode.
2016-05-02T12:07:06.016-0400 W STORAGE  [initandlisten] database /data/queryable/qrtmp/ local could not be opened due to DBException 20: Cannot create a database in read-only mode.
2016-05-02T12:07:06.016-0400 D STORAGE  [initandlisten] mmf close 
2016-05-02T12:07:06.016-0400 I STORAGE  [initandlisten] exception in initAndListen: 20 Cannot create a database in read-only mode., terminating



 Comments   
Comment by Githook User [ 20/May/16 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-24024 If there is no "local" database at startup in queryableBackupMode, do not panic.

At startup, the logic that checks for version-specific bugs that may need to be
worked around attempts to open the "local" database to see what version of
mongod was last used to access the data files. In queryableBackupMode, if there
is no local database, this can legally fail, at least for some storage engines.
This patch recovers from that failure, rather than shutting down the server.

This patch also updates the read_only and read_only_sharded test suites, to test
cases where there is no "local" database, as this is the standard
queryableBackupMode use case.
Branch: master
https://github.com/mongodb/mongo/commit/68ee19bbd79cd33280cb01af38129249a32dcf7a

Comment by Andy Schwerin [ 04/May/16 ]

The reason that I didn't find this when testing SERVER-23299 is that this bug only manifests if there is no local database at all. The most likely way for that to occur is if you are restoring from a backup without the local database, such as those built by the MongoDB backup service. I'll put together a patch.

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