summaryrefslogtreecommitdiff
path: root/src/mongo/s/write_ops/batched_command_response.h
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2015-09-17 18:54:45 -0400
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2015-09-23 14:52:18 -0400
commit479900720b6da57c20a2956c3629375c361ffc59 (patch)
treed5ef0c5ebbc55a7922b31aa7c0f84cfb11ee4c2b /src/mongo/s/write_ops/batched_command_response.h
parent2c1facf471cce8254e314755c3c7d2fbc753e5f4 (diff)
downloadmongo-479900720b6da57c20a2956c3629375c361ffc59.tar.gz
SERVER-20434 Allow mongos to store full OpTimes for GLE support
Diffstat (limited to 'src/mongo/s/write_ops/batched_command_response.h')
-rw-r--r--src/mongo/s/write_ops/batched_command_response.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/s/write_ops/batched_command_response.h b/src/mongo/s/write_ops/batched_command_response.h
index 370f836b921..d4075ac3f2b 100644
--- a/src/mongo/s/write_ops/batched_command_response.h
+++ b/src/mongo/s/write_ops/batched_command_response.h
@@ -33,6 +33,7 @@
#include "mongo/base/string_data.h"
#include "mongo/db/jsobj.h"
+#include "mongo/db/repl/optime.h"
#include "mongo/s/bson_serializable.h"
#include "mongo/s/write_ops/write_error_detail.h"
#include "mongo/s/write_ops/batched_upsert_detail.h"
@@ -58,7 +59,6 @@ public:
static const BSONField<long long> n;
static const BSONField<long long> nModified;
static const BSONField<std::vector<BatchedUpsertDetail*>> upsertDetails;
- static const BSONField<Timestamp> lastOp;
static const BSONField<OID> electionId;
static const BSONField<std::vector<WriteErrorDetail*>> writeErrors;
static const BSONField<WCErrorDetail*> writeConcernError;
@@ -120,10 +120,10 @@ public:
const std::vector<BatchedUpsertDetail*>& getUpsertDetails() const;
const BatchedUpsertDetail* getUpsertDetailsAt(std::size_t pos) const;
- void setLastOp(Timestamp lastOp);
+ void setLastOp(repl::OpTime lastOp);
void unsetLastOp();
bool isLastOpSet() const;
- Timestamp getLastOp() const;
+ repl::OpTime getLastOp() const;
void setElectionId(const OID& electionId);
void unsetElectionId();
@@ -176,14 +176,14 @@ private:
// Should only be present if _singleUpserted is not.
std::unique_ptr<std::vector<BatchedUpsertDetail*>> _upsertDetails;
- // (O) Timestamp assigned to the write op when it was written to the oplog.
+ // (O) repl::OpTime assigned to the write op when it was written to the oplog.
// Normally, getLastError can use Client::_lastOp, but this is not valid for
// mongos which loses track of the session due to RCAR. Therefore, we must
// keep track of the lastOp manually ourselves.
- Timestamp _lastOp;
+ repl::OpTime _lastOp;
bool _isLastOpSet;
- // (O) In addition to keeping track of the above lastOp timestamp, we must also keep
+ // (O) In addition to keeping track of the above lastOp repl::OpTime, we must also keep
// track of the primary we talked to. This is because if the primary moves,
// subsequent calls to getLastError are invalid. The only way we know if an
// election has occurred is to use the unique electionId.