2019-05-31 03:43:48 -04:00
|
|
|
// Basic test that the two-phase commit coordinator metrics fields appear in serverStatus output.
|
|
|
|
|
(function() {
|
2019-07-26 18:20:35 -04:00
|
|
|
"use strict";
|
2019-05-31 03:43:48 -04:00
|
|
|
|
2021-05-10 14:43:44 +00:00
|
|
|
const st = new ShardingTest({shards: 1});
|
2019-05-31 03:43:48 -04:00
|
|
|
|
2019-07-26 18:20:35 -04:00
|
|
|
const res = assert.commandWorked(st.shard0.adminCommand({serverStatus: 1}));
|
|
|
|
|
assert.neq(null, res.twoPhaseCommitCoordinator);
|
|
|
|
|
assert.eq(0, res.twoPhaseCommitCoordinator.totalCreated);
|
|
|
|
|
assert.eq(0, res.twoPhaseCommitCoordinator.totalStartedTwoPhaseCommit);
|
|
|
|
|
assert.eq(0, res.twoPhaseCommitCoordinator.totalCommittedTwoPhaseCommit);
|
|
|
|
|
assert.eq(0, res.twoPhaseCommitCoordinator.totalAbortedTwoPhaseCommit);
|
|
|
|
|
assert.neq(null, res.twoPhaseCommitCoordinator.currentInSteps);
|
|
|
|
|
assert.eq(0, res.twoPhaseCommitCoordinator.currentInSteps.writingParticipantList);
|
|
|
|
|
assert.eq(0, res.twoPhaseCommitCoordinator.currentInSteps.waitingForVotes);
|
|
|
|
|
assert.eq(0, res.twoPhaseCommitCoordinator.currentInSteps.writingDecision);
|
|
|
|
|
assert.eq(0, res.twoPhaseCommitCoordinator.currentInSteps.waitingForDecisionAcks);
|
|
|
|
|
assert.eq(0, res.twoPhaseCommitCoordinator.currentInSteps.deletingCoordinatorDoc);
|
2019-05-31 03:43:48 -04:00
|
|
|
|
2019-07-26 18:20:35 -04:00
|
|
|
st.stop();
|
2019-05-31 03:43:48 -04:00
|
|
|
})();
|