[SERVER-29373] Two Phase Drops: Relax index namespace length constraint under non-mmapv1 storage engines when doing collection renames for two phase drops Created: 25/May/17 Updated: 30/Oct/23 Resolved: 12/Jul/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage, WiredTiger |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.10 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Benety Goh | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||
| Sprint: | Repl 2017-07-31 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Under MMAP, there's a limit on the generated index namespace in a collection due to the on-disk format. This constraint imposes a restriction on the target collection namespace when we are doing collection renames. It's likely that this constraint may not apply to WiredTiger. This may have implications for importing databases between different storage engines and also for downgrade to previous versions of the server that still have this restriction. |
| Comments |
| Comment by Githook User [ 12/Jul/17 ] | |||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | |||
| Comment by Spencer Brody (Inactive) [ 08/Jun/17 ] | |||
|
geert.bosch, unless we made all the drop-pending collection names be a single character long (which we can't do because we need them to be prefixed with 'system.' to avoid collisions) we would have no guarantee that any name we use will be shorter than the original collection name and thus definitely won't hit the index name limit. I think this ticket is going to be required to make 2 phase drop and rollback work properly. We'll also need some facility we can use to ask the storage engine whether an index name is valid, that the 2 phase drop code can use to decide whether to fall back to 1 phase drops on the mmapv1 storage engine. | |||
| Comment by Eric Milkie [ 26/May/17 ] | |||
|
Unfortunately, the drop oplog entry does not contain the names of the indexes in the dropped collection. | |||
| Comment by Geert Bosch [ 26/May/17 ] | |||
|
It's in the drop oplog entry, no? | |||
| Comment by Eric Milkie [ 26/May/17 ] | |||
|
We need the original name in order to restore it for rollback. | |||
| Comment by Geert Bosch [ 26/May/17 ] | |||
|
Why does the original name need to be part of the renamed collection name? In other words, why can't you just use a random value for the name? | |||
| Comment by Benety Goh [ 25/May/17 ] | |||
|
The IndexCatalog is checks the index namespace length for all storage engines. When we tried relaxing the constraint under two phase drops, we saw the following error in a test that uses long index field names:
| |||
| Comment by Eric Milkie [ 25/May/17 ] | |||
|
Note that this relaxation should only happen for rename targets for two phase drop, as these collections will be hidden from outside observers, including other nodes in a replica set and mongodump. |