Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
Fully Compatible
-
ALL
-
-
Platform 4 06/05/15
Description
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.
Attachments
Issue Links
- is depended on by
-
SERVER-18007 StatusWith should work with non-default constructible T
-
- Closed
-