[SERVER-72094] FindCmd checks the bool value of an optional incorrectly Created: 13/Dec/22 Updated: 29/Oct/23 Resolved: 27/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matthew Saltz (Inactive) | Assignee: | Adi Agrawal |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Execution
|
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | QE 2023-02-06 |
| Participants: |
| Description |
make it seem like refreshNss should only be evaluated if the collection exists in ctx, which is of type boost::optional<AutoGetCollectionForReadCommandMaybeLockFree>. But it's actually only checking whether the optional is populated. But the optional is always populated so refreshNss always runs. It should probably be if (*ctx) or the code should be rewritten to not use an optional, but that might be difficult since we manually reset the optional later on. |
| Comments |
| Comment by Githook User [ 27/Jan/23 ] |
|
Author: {'name': 'Adityavardhan Agrawal', 'email': 'aa729@cornell.edu', 'username': 'Adityav369'}Message: |
| Comment by Steve Tarzia [ 24/Jan/23 ] |
|
It could also be that the comment is incorrect. |