[SERVER-18738] FindAndModifyCommand::run can create an invalid StatusWith Created: 29/May/15 Updated: 19/Sep/15 Resolved: 29/May/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Adam Midvidy | Assignee: | Adam Midvidy |
| Resolution: | Done | Votes: | 0 |
| Labels: | UT | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | Pull https://github.com/amidvidy/mongo/tree/SERVER-18007-optional and run any of find_and_modify {"", 2, 3, 4}.js |
||||||||
| Sprint: | Platform 4 06/05/15 | ||||||||
| Participants: | |||||||||
| Description |
Note that waitForWriteConcern returns a Status, not a StatusWith. If it succeeds, Status::OK() is assigned to wcResult which creates an invalid StatusWith. An engaged StatusWith<T> (i.e. a StatusWith<T> s, such that s.isOK() == true) can only be created by assigning a T - assigning Status::OK() does not actually initialize the value. |
| Comments |
| Comment by Githook User [ 29/May/15 ] |
|
Author: {u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}Message: |