[SERVER-16567] extend data directory metadata to hold storage engine creation settings for startup validation Created: 16/Dec/14 Updated: 03/Mar/15 Resolved: 09/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 2.8.0-rc2 |
| Fix Version/s: | 2.8.0-rc5 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Extend data directory metadata (introduced in On startup, the storage engine will check the current configuration/startup options against the creation settings stored in the metadata. If an inconsistency is detected, the server will fail to start up.
--------------- In attempt to emulate something a user might inadvertently do, I started mongod with directoryForIndexes and added an index to an existing collection. 1) mongod now had some indexes in top level data directory and some in "index" subdirectory of data directory I now emulated a partial backup by bringing down mongod, and removing "index" directory - this is what would happen if index was mounted on another physical device and a snapshot of just data directory was taken (leaving all or some indexes behind). I now brought up mongod and ran db.collection.getIndexes and db.collection.find( <query-using-new-index>).explain() and same find with explain(true). The first two commands succeeded with correct output, but actually forcing the running of the indexed query crashed the server with:
So it would be nice to make sure that on startup _mdb metadata matches expected files? Also not sure that allowing a mix with in subdirectory and not in subdirectory indexes is a good idea (same problem would probably happen if I mistakenly start mongod without directoryForIndexes flag - it would be like index files disappeared while being in metadata). |
| Comments |
| Comment by Githook User [ 09/Jan/15 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Githook User [ 09/Jan/15 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Githook User [ 09/Jan/15 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Matt Kangas [ 19/Dec/14 ] |
|
I concur. When --wiredTigerDirectoryForIndexes is used, we should verify that the subdirectories still exist and the tables _mdb_metadata.wt expects are still in them. The feature exists so users can put indexes on a separate partition, and failure to mount the correct partition will no doubt happen in the field. Also, when a user initializes a dbpath with --wiredTigerDirectoryForIndexes, we should require the same option for future uses of that dbpath. We can extend |