summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2013-12-20 10:40:19 -0500
committerEric Milkie <milkie@10gen.com>2013-12-20 11:11:34 -0500
commit77384d0a36a20a361f4b17260c127c5bb2aeacc1 (patch)
tree159064e1a39b7ec676fa1c2ccb6196c0f70c557c /src/mongo/s
parent15727f68617036f50194703267bcd134a9bad05e (diff)
downloadmongo-77384d0a36a20a361f4b17260c127c5bb2aeacc1.tar.gz
SERVER-9469 add full support for Timestamp/OpTime to field parser
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/write_ops/batched_command_response.cpp5
-rw-r--r--src/mongo/s/write_ops/batched_command_response.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/s/write_ops/batched_command_response.cpp b/src/mongo/s/write_ops/batched_command_response.cpp
index e8e4f7cf741..084956437ff 100644
--- a/src/mongo/s/write_ops/batched_command_response.cpp
+++ b/src/mongo/s/write_ops/batched_command_response.cpp
@@ -43,7 +43,7 @@ namespace mongo {
const BSONField<long long> BatchedCommandResponse::nDocsModified("nDocsModified", 0);
const BSONField<std::vector<BatchedUpsertDetail*> >
BatchedCommandResponse::upsertDetails("upserted");
- const BSONField<Date_t> BatchedCommandResponse::lastOp("lastOp");
+ const BSONField<OpTime> BatchedCommandResponse::lastOp("lastOp");
const BSONField<std::vector<WriteErrorDetail*> >
BatchedCommandResponse::writeErrors("writeErrors");
const BSONField<BSONObj> BatchedCommandResponse::writeConcernError("writeConcernError");
@@ -176,8 +176,7 @@ namespace mongo {
if ( fieldState == FieldParser::FIELD_INVALID ) return false;
if ( fieldState == FieldParser::FIELD_SET ) _upsertDetails.reset( tempUpsertDetails );
- fieldState = FieldParser::extract(source, lastOp,
- reinterpret_cast<Date_t*>(&_lastOp), errMsg);
+ fieldState = FieldParser::extract(source, lastOp, &_lastOp, errMsg);
if (fieldState == FieldParser::FIELD_INVALID) return false;
_isLastOpSet = fieldState == FieldParser::FIELD_SET;
diff --git a/src/mongo/s/write_ops/batched_command_response.h b/src/mongo/s/write_ops/batched_command_response.h
index 4f8e9db5a15..4119510f801 100644
--- a/src/mongo/s/write_ops/batched_command_response.h
+++ b/src/mongo/s/write_ops/batched_command_response.h
@@ -60,7 +60,7 @@ namespace mongo {
static const BSONField<long long> n;
static const BSONField<long long> nDocsModified;
static const BSONField<std::vector<BatchedUpsertDetail*> > upsertDetails;
- static const BSONField<Date_t> lastOp;
+ static const BSONField<OpTime> lastOp;
static const BSONField<std::vector<WriteErrorDetail*> > writeErrors;
static const BSONField<BSONObj> writeConcernError;