-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code, Querying
-
Fully Compatible
-
ALL
-
-
Platform 4 06/05/15
StatusWith<WriteConcernOptions> wcResult = extractWriteConcern(cmdObj); ... lots of lines of code... WriteConcernResult res; wcResult = waitForWriteConcern( txn, repl::ReplClientInfo::forClient(txn->getClient()).getLastOp(), &res); appendCommandWCStatus(result, wcResult.getStatus());
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.
- is depended on by
-
SERVER-18007 StatusWith should work with non-default constructible T
- Closed