diff options
author | Jason Chan <jason.chan@10gen.com> | 2019-03-25 14:04:50 -0400 |
---|---|---|
committer | Jason Chan <jason.chan@10gen.com> | 2019-03-25 14:18:15 -0400 |
commit | f8bf360e86ff96a0636575af7d1cee8ae9f0c3f0 (patch) | |
tree | fca8003369076ab69c7be139e8d726538e78e944 /src/mongo/dbtests | |
parent | 35374f25e2bc3fca9b42958ffc98032cf31f53a1 (diff) | |
download | mongo-f8bf360e86ff96a0636575af7d1cee8ae9f0c3f0.tar.gz |
SERVER-39792 Update the txn table only on the first txn operation on primary
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r-- | src/mongo/dbtests/storage_timestamp_tests.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/dbtests/storage_timestamp_tests.cpp b/src/mongo/dbtests/storage_timestamp_tests.cpp index c4e2e35c856..95afd85a963 100644 --- a/src/mongo/dbtests/storage_timestamp_tests.cpp +++ b/src/mongo/dbtests/storage_timestamp_tests.cpp @@ -2914,7 +2914,8 @@ public: sessionInfo = getSessionTxnInfoAtTimestamp(secondOplogEntryTs, true); ASSERT_EQ(sessionInfo["state"].String(), "inProgress"); - ASSERT_EQ(sessionInfo["lastWriteOpTime"]["ts"].timestamp(), secondOplogEntryTs); + // The transaction table is only updated at the start of the transaction. + ASSERT_EQ(sessionInfo["lastWriteOpTime"]["ts"].timestamp(), firstOplogEntryTs); sessionInfo = getSessionTxnInfoAtTimestamp(commitEntryTs, true); ASSERT_EQ(sessionInfo["state"].String(), "committed"); @@ -3091,7 +3092,8 @@ public: sessionInfo = getSessionTxnInfoAtTimestamp(secondOplogEntryTs, true); ASSERT_EQ(sessionInfo["state"].String(), "inProgress"); - ASSERT_EQ(sessionInfo["lastWriteOpTime"]["ts"].timestamp(), secondOplogEntryTs); + // The transaction table is only updated at the start of the transaction. + ASSERT_EQ(sessionInfo["lastWriteOpTime"]["ts"].timestamp(), firstOplogEntryTs); sessionInfo = getSessionTxnInfoAtTimestamp(prepareEntryTs, true); ASSERT_EQ(sessionInfo["state"].String(), "prepared"); |