Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Mongo/DocDB Ack Checkpoint metrics #5350

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private void monitorAcknowledgment(final ExecutorService executorService, final
private void checkpoint(final String resumeToken, final long recordCount) {
LOG.debug("Perform regular checkpointing for resume token {} at record count {}", resumeToken, recordCount);
partitionCheckpoint.checkpoint(resumeToken, recordCount);
this.recordsCheckpointed.increment(recordCount);
this.recordsCheckpointed.increment();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this metric now means "times" checkpointed instead of "records" checkpointed?

}

Optional<AcknowledgementSet> createAcknowledgementSet(final String resumeToken, final long recordNumber) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void createAcknowledgementSet_enabled_ackSetWithAck() {
assertThat(streamAckManager.getCheckpoints().peek(), is(nullValue()));
verify(positiveAcknowledgementSets).increment();
verifyNoInteractions(negativeAcknowledgementSets);
verify(recordsCheckpointed, atLeastOnce()).increment(anyDouble());
verify(recordsCheckpointed, atLeastOnce()).increment();
}

@Test
Expand Down Expand Up @@ -151,7 +151,7 @@ public void createAcknowledgementSet_enabled_multipleAckSetWithAck() {

verify(positiveAcknowledgementSets, atLeastOnce()).increment();
verifyNoInteractions(negativeAcknowledgementSets);
verify(recordsCheckpointed, atLeastOnce()).increment(anyDouble());
verify(recordsCheckpointed, atLeastOnce()).increment();
}

@Test
Expand Down
Loading