From 8d5727273585524a38d4a663b61403a263f7cf3d Mon Sep 17 00:00:00 2001 From: Lingzhi Deng Date: Thu, 23 May 2019 21:10:14 -0400 Subject: SERVER-41008: Use timestampCmp for timestamp comparison in PrepareHelpers.awaitMajorityCommitted --- jstests/core/txns/libs/prepare_helpers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jstests/core/txns/libs/prepare_helpers.js b/jstests/core/txns/libs/prepare_helpers.js index 605ca95164c..0f8f346a6bb 100644 --- a/jstests/core/txns/libs/prepare_helpers.js +++ b/jstests/core/txns/libs/prepare_helpers.js @@ -132,7 +132,8 @@ const PrepareHelpers = (function() { assert.soon(() => { const ts = assert.commandWorked(primary.adminCommand({replSetGetStatus: 1})) .optimes.lastCommittedOpTime.ts; - if (ts >= timestamp) { + if (timestampCmp(ts, timestamp) >= 0) { + print(`Finished awaiting lastCommittedOpTime.ts, now at ${ts}`); return true; } else { print(`Awaiting lastCommittedOpTime.ts, now at ${ts}`); -- cgit v1.2.1