Skip to content

Commit d633834

Browse files
XueruiFaEvergreen Agent
authored andcommitted
SERVER-50178: Add logging to initial_sync_nodes_maintain_and_gossip_commit_point.js
1 parent cc68e42 commit d633834

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

jstests/replsets/initial_sync_nodes_maintain_and_gossip_commit_point.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function getLastCommittedOpTime(conn) {
4141
}
4242

4343
const firstCommitPoint = getLastCommittedOpTime(primary);
44-
jsTestLog(`First commit point: ${firstCommitPoint}`);
44+
jsTestLog(`First commit point: ${tojson(firstCommitPoint)}`);
4545

4646
// Disconnect the non-voting secondary from the other nodes so that it won't update its commit point
4747
// from the other nodes' heartbeats.
@@ -80,7 +80,7 @@ rst.awaitLastOpCommitted(undefined, [primary, secondary]);
8080

8181
const secondCommitPointPrimary = getLastCommittedOpTime(primary);
8282
const secondCommitPointSecondary = getLastCommittedOpTime(secondary);
83-
jsTestLog(`Second commit point: ${secondCommitPointPrimary}`);
83+
jsTestLog(`Second commit point: ${tojson(secondCommitPointPrimary)}`);
8484

8585
// Verify that the commit point has advanced on the primary and secondary.
8686
assert.eq(1, rs.compareOpTimes(secondCommitPointPrimary, firstCommitPoint));
@@ -91,7 +91,7 @@ let commitPointNonVotingSecondary = getLastCommittedOpTime(nonVotingSecondary);
9191
assert.eq(rs.compareOpTimes(commitPointNonVotingSecondary, secondCommitPointPrimary),
9292
-1,
9393
`commit point on the non-voting secondary should not have been advanced: ${
94-
commitPointNonVotingSecondary}`);
94+
tojson(commitPointNonVotingSecondary)}`);
9595

9696
// Allow the node to proceed to the oplog applying phase of initial sync and ensure that the oplog
9797
// fetcher thread is still running.
@@ -107,7 +107,7 @@ rst.awaitLastOpCommitted(undefined, [primary, secondary]);
107107

108108
const thirdCommitPointPrimary = getLastCommittedOpTime(primary);
109109
const thirdCommitPointSecondary = getLastCommittedOpTime(secondary);
110-
jsTestLog(`Third commit point: ${thirdCommitPointPrimary}`);
110+
jsTestLog(`Third commit point: ${tojson(thirdCommitPointPrimary)}`);
111111

112112
// Verify that the commit point has advanced on the primary and secondary.
113113
assert.eq(1, rs.compareOpTimes(thirdCommitPointPrimary, secondCommitPointPrimary));
@@ -118,7 +118,7 @@ commitPointNonVotingSecondary = getLastCommittedOpTime(nonVotingSecondary);
118118
assert.eq(rs.compareOpTimes(commitPointNonVotingSecondary, thirdCommitPointPrimary),
119119
-1,
120120
`commit point on the non-voting secondary should not have been advanced: ${
121-
commitPointNonVotingSecondary}`);
121+
tojson(commitPointNonVotingSecondary)}`);
122122

123123
// Allow the initial sync node to complete oplog fetching but hang it before it completes initial
124124
// sync.
@@ -133,7 +133,7 @@ assert.gte(
133133
rs.compareOpTimes(commitPointInitialSyncNode, secondCommitPointPrimary),
134134
0,
135135
`commit point on initial sync node should be at least as up-to-date as the second commit point: ${
136-
commitPointInitialSyncNode}`);
136+
tojson(commitPointInitialSyncNode)}`);
137137

138138
// Verify that the non-voting secondary has received the updated commit point via heartbeats from
139139
// the initial sync node.

0 commit comments

Comments
 (0)