[SERVER-9542] Incorrectly coded chunk/shard version comparison Created: 02/May/13 Updated: 11/Jul/16 Resolved: 02/May/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Sharding |
| Affects Version/s: | 2.2.0 |
| Fix Version/s: | 2.4.4, 2.5.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Tad Marshall | Assignee: | Tad Marshall |
| 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 |
| Participants: |
| Description |
|
The "<=" comparison operator for chunk/shard versions is incorrectly coded to execute a "<" comparison. Limited testing suggests minimal impact; adding a "fatal assert" on the missed case (where the values compared are equal) showed that a test for reload failed, leading to unnecessary reloads, but did not reveal other symptoms. For 2.5 and 2.4, the affected code is in src/mongo/s/chunk_version.h. |
| Comments |
| Comment by auto [ 13/May/13 ] |
|
Author: {u'date': u'2013-05-02T18:34:02Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Do not use "<" to execute a "<=" comparison. |
| Comment by auto [ 13/May/13 ] |
|
Author: {u'date': u'2013-05-02T20:41:30Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Unit test was passing due to the bug fixed in |
| Comment by auto [ 13/May/13 ] |
|
Author: {u'date': u'2013-05-02T20:41:30Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Unit test was passing due to the bug fixed in |
| Comment by auto [ 02/May/13 ] |
|
Author: {u'date': u'2013-05-02T20:41:30Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Unit test was passing due to the bug fixed in |
| Comment by auto [ 02/May/13 ] |
|
Author: {u'date': u'2013-05-02T20:41:30Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Unit test was passing due to the bug fixed in |
| Comment by Tad Marshall [ 02/May/13 ] |
|
The code change showed that one of the unit tests was broken ... collection_manager_test.cpp. |
| Comment by auto [ 02/May/13 ] |
|
Author: {u'date': u'2013-05-02T18:34:02Z', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Do not use "<" to execute a "<=" comparison. |