[SERVER-70394] Fix self-swap in MultiPlanStage::removeRejectedPlans Created: 10/Oct/22 Updated: 29/Oct/23 Resolved: 10/Oct/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.15, 6.0.4, 6.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ivan Fefer | Assignee: | Ivan Fefer |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | QE 2022-10-17 | ||||
| Participants: | |||||
| Linked BF Score: | 135 | ||||
| Description |
|
In if statement here we should check _backupPlanIdx, not _bestPlanIdx https://github.com/mongodb/mongo/blob/1d93d09948c29534f7c82950ba7771ac0f4da22c/src/mongo/db/exec/multi_plan.cpp#L367 It is relatively harmless, but causes debug mode to show errors, because of an old C++ standard issue: https://stackoverflow.com/questions/22915325/avoiding-self-assignment-in-stdshuffle |
| Comments |
| Comment by Githook User [ 02/Dec/22 ] |
|
Author: {'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}Message: (cherry picked from commit df498b17710f364a853c4dc1731cbdc6ec91e0f5) |
| Comment by Githook User [ 02/Dec/22 ] |
|
Author: {'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}Message: (cherry picked from commit df498b17710f364a853c4dc1731cbdc6ec91e0f5) |
| Comment by Githook User [ 10/Oct/22 ] |
|
Author: {'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}Message: |