diff options
author | Gregory Noma <gregory.noma@gmail.com> | 2022-05-03 13:19:55 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-07-26 14:12:53 +0000 |
commit | 254925ef996e437cd6324e6a2e042d52d4b3761b (patch) | |
tree | 00f54baba557abbf07e81d3567a710f90e5bc9b3 | |
parent | 17529e0c8745b51facb5226000cd08673cbe3f39 (diff) | |
download | mongo-254925ef996e437cd6324e6a2e042d52d4b3761b.tar.gz |
SERVER-65262 Use `timestamp_transaction_uint` for `commit_transaction`
(cherry picked from commit 497bbb6faf83673f226a34988e0d75ad62e2020d)
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp index 3de8c5ab900..14a0317b8a0 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp @@ -386,27 +386,22 @@ void WiredTigerRecoveryUnit::_txnClose(bool commit) { int wtRet; if (commit) { - StringBuilder conf; if (!_commitTimestamp.isNull()) { // There is currently no scenario where it is intentional to commit before the current // read timestamp. invariant(_readAtTimestamp.isNull() || _commitTimestamp >= _readAtTimestamp); if (MONGO_likely(!doUntimestampedWritesForIdempotencyTests.shouldFail())) { - conf << "commit_timestamp=" << integerToHex(_commitTimestamp.asULL()) << ","; + s->timestamp_transaction_uint(s, WT_TS_TXN_TYPE_COMMIT, _commitTimestamp.asULL()); } _isTimestamped = true; } if (!_durableTimestamp.isNull()) { - conf << "durable_timestamp=" << integerToHex(_durableTimestamp.asULL()); + s->timestamp_transaction_uint(s, WT_TS_TXN_TYPE_DURABLE, _durableTimestamp.asULL()); } - if (_mustBeTimestamped) { - invariant(_isTimestamped); - } - - wtRet = s->commit_transaction(s, conf.str().c_str()); + wtRet = s->commit_transaction(s, nullptr); LOGV2_DEBUG(22412, 3, |