summaryrefslogtreecommitdiff
path: root/src/mongo/db/session_txn_record.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-10-20 17:03:18 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-10-23 17:54:51 -0400
commitaa95387d1a8fb475c267a3ca0e84a1b4a18a7ace (patch)
treef258c7c961e7577d35b49080cfe1abe660889ab9 /src/mongo/db/session_txn_record.h
parentdbe347e2ec54858a39a2b4c59d5812214b4b94cd (diff)
downloadmongo-aa95387d1a8fb475c267a3ca0e84a1b4a18a7ace.tar.gz
SERVER-31328 Don't fetch oplog entries for retries of executed inserts or deletes
Diffstat (limited to 'src/mongo/db/session_txn_record.h')
-rw-r--r--src/mongo/db/session_txn_record.h58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/mongo/db/session_txn_record.h b/src/mongo/db/session_txn_record.h
deleted file mode 100644
index 332f95c5ef5..00000000000
--- a/src/mongo/db/session_txn_record.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (C) 2017 MongoDB Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * As a special exception, the copyright holders give permission to link the
- * code of portions of this program with the OpenSSL library under certain
- * conditions as described in each individual source file and distribute
- * linked combinations including the program with the OpenSSL library. You
- * must comply with the GNU Affero General Public License in all respects for
- * all of the code used other than as permitted herein. If you modify file(s)
- * with this exception, you may extend this exception to your version of the
- * file(s), but you are not obligated to do so. If you do not wish to do so,
- * delete this exception statement from your version. If you delete this
- * exception statement from all source files in the program, then also delete
- * it in the license file.
- */
-
-#pragma once
-
-#include "mongo/db/logical_session_id.h"
-#include "mongo/db/repl/optime.h"
-#include "mongo/db/session_txn_record_gen.h"
-
-namespace mongo {
-
-inline bool operator==(const SessionTxnRecord& lhs, const SessionTxnRecord& rhs) {
- return (lhs.getSessionId() == rhs.getSessionId()) && (lhs.getTxnNum() == rhs.getTxnNum()) &&
- (lhs.getLastWriteOpTime() == rhs.getLastWriteOpTime());
-}
-
-inline bool operator!=(const SessionTxnRecord& lhs, const SessionTxnRecord& rhs) {
- return !(lhs == rhs);
-}
-
-/**
- * A record is greater (i.e. later) than another if its transaction number is greater, or if its
- * transaction number is the same, and its last write optime is greater. Records can only be
- * compared meaningfully for the same session id.
- */
-inline bool operator>(const SessionTxnRecord& lhs, const SessionTxnRecord& rhs) {
- invariant(lhs.getSessionId() == rhs.getSessionId());
-
- return (lhs.getTxnNum() > rhs.getTxnNum()) ||
- (lhs.getTxnNum() == rhs.getTxnNum() && lhs.getLastWriteOpTime() > rhs.getLastWriteOpTime());
-}
-
-} // namespace mongo