[SERVER-20548] Suspicious chunk version initialization in ChunkManager Created: 21/Sep/15 Updated: 27/Oct/15 Resolved: 20/Oct/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.1.8 |
| Fix Version/s: | 3.2.0-rc1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Misha Tyulenev |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Sharding B (10/30/15) |
| Participants: |
| Description |
|
From https://github.com/mongodb/mongo/blob/r3.1.8/src/mongo/s/chunk_manager.cpp#L173
This looks suspicious as the config.collections does not contain any information about the highest (or any for that matter) chunk version of the collection. |
| Comments |
| Comment by Githook User [ 21/Oct/15 ] | ||||||
|
Author: {u'username': u'mikety', u'name': u'Misha Tyulenev', u'email': u'misha@mongodb.com'}Message: | ||||||
| Comment by Misha Tyulenev [ 20/Oct/15 ] | ||||||
| Comment by Githook User [ 20/Oct/15 ] | ||||||
|
Author: {u'username': u'mikety', u'name': u'Misha Tyulenev', u'email': u'misha@mongodb.com'}Message: | ||||||
| Comment by Misha Tyulenev [ 16/Oct/15 ] | ||||||
|
It does not look like a bug to me:
This string is parsed into valid chunk version by https://github.com/mongodb/mongo/blob/03c414e87e5c3bc34230421163cdd06c9451389d/src/mongo/s/chunk_version.h#L288-L311 | ||||||
| Comment by Randolph Tan [ 22/Sep/15 ] | ||||||
|
I propose that the _version should be initialized with UNSHARDED instead of trying to extract from garbage. Also note the unnecessary toBSON call from a data type that was parsed from a BSON obj. | ||||||
| Comment by Andy Schwerin [ 22/Sep/15 ] | ||||||
|
renctan, what do you want to do with this ticket? |