summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@mongodb.com>2021-10-07 19:58:50 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-10-29 14:36:17 +0000
commit0b4035aab648ead76c47703317c2bcb00fa10bea (patch)
treecbfdfc9993edd4881cea78b8bad427e2decd5351 /src
parentfcaf9dead44cc6e6245f29d236bd662f9fa4cd10 (diff)
downloadmongo-0b4035aab648ead76c47703317c2bcb00fa10bea.tar.gz
SERVER-60511 getPinnedOplog return value should always be std::min compared with the pinned timestamp
(cherry picked from commit 4635c1f58339cbe754ffd908a16e8d6ebe7aa5a0)
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
index 3a4fc015900..9abca11109f 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
@@ -2287,7 +2287,7 @@ Timestamp WiredTigerKVEngine::getPinnedOplog() const {
auto status = getOplogNeededForRollback();
if (status.isOK()) {
- return status.getValue();
+ return std::min(status.getValue(), pinned);
}
// If getOplogNeededForRollback fails, don't truncate any oplog right now.