[SERVER-12836] upgradeCheck() or collUpgradeCheck() should exclude changelog collection Created: 21/Feb/14 Updated: 10/Dec/14 Resolved: 28/Feb/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin |
| Affects Version/s: | 2.6.0-rc0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Matt Dannenberg |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
While normally changelog would be excluded because it lives in config database, it is very easy to restore the config DB into a differently named database and get an error from upgradeServer() check on every single document in that collection that has a shard key with . in the name (example if I shard on "foo.bar" where bar is embedded document inside foo, like "user.screen_name" in twitter json, for example). Suggestion: exclude collections named "changelog" or ignore errors on documents in collection "changelog" if the error is embedded inside "min" or "max" top level fields. |
| Comments |
| Comment by Matt Dannenberg [ 28/Feb/14 ] |
|
The consensus was that it was better to note false problems than miss real ones |
| Comment by Asya Kamsky [ 28/Feb/14 ] |
|
Are you asking if any of them would legitimately be missing _id field/index? As far as I can tell all of them have _id fields and it's indexed normally. The only error that they all have triggered is having "illegal" key names (ones with "." in them). |
| Comment by Matt Dannenberg [ 27/Feb/14 ] |
|
asya do these collections still have _id indexes (should I skip that check as well)? |
| Comment by Asya Kamsky [ 21/Feb/14 ] |
|
By the same token, other config collections which mention the shard key should also be excluded: chunks For chunks min and max can have "illegal" keys. |