summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/session_catalog_migration_source.cpp
diff options
context:
space:
mode:
authorCheahuychou Mao <mao.cheahuychou@gmail.com>2023-05-16 18:42:34 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-16 22:00:24 +0000
commit9354aa6ccf769929ed3e7bd09f0dd95f8ab3a2a2 (patch)
tree3e8918826719bbfd5315b01fefd6b7b951637f99 /src/mongo/db/s/session_catalog_migration_source.cpp
parentf05053d2cb65b84eaed4db94c25e9fe4be82d78c (diff)
downloadmongo-9354aa6ccf769929ed3e7bd09f0dd95f8ab3a2a2.tar.gz
SERVER-76807 Avoid adding opTimes for non-retryable internal transactions to the session migration new opTime buffer
Diffstat (limited to 'src/mongo/db/s/session_catalog_migration_source.cpp')
-rw-r--r--src/mongo/db/s/session_catalog_migration_source.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/s/session_catalog_migration_source.cpp b/src/mongo/db/s/session_catalog_migration_source.cpp
index f10a0bdfcbc..37a87b5e131 100644
--- a/src/mongo/db/s/session_catalog_migration_source.cpp
+++ b/src/mongo/db/s/session_catalog_migration_source.cpp
@@ -685,6 +685,13 @@ bool SessionCatalogMigrationSource::_fetchNextNewWriteOplog(OperationContext* op
const auto sessionId = *nextNewWriteOplog.getSessionId();
if (isInternalSessionForNonRetryableWrite(sessionId)) {
+ dassert(0,
+ str::stream() << "Cannot add op time for a non-retryable "
+ "internal transaction to the "
+ "session migration op time queue - "
+ << "session id:" << sessionId << " oplog entry: "
+ << redact(nextNewWriteOplog.toBSONForLogging()));
+
// Transactions inside internal sessions for non-retryable writes are not
// retryable so there is no need to transfer their write history to the
// recipient.