Skip to content

Conversation

@FGasper
Copy link
Collaborator

@FGasper FGasper commented Dec 4, 2024

This adds a report of change stream lags to the logs’ progress reports.

Copy link
Collaborator

@tdq45gj tdq45gj left a comment

Choose a reason for hiding this comment

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

LGTM

dstLag, hasDstLag := verifier.dstChangeStreamReader.GetLag().Get()
if hasDstLag {
if !hasSrcLag {
builder.WriteString("\n")
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems that src and dst lags are adding the new line differently. Not sure if it's intentional.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There should always be a single newline in front of the lag-report lines. So if there was a source lag then there’s no need for one before the dst lag, but if there wasn’t a source lag then the dst lag has to have one.

@FGasper FGasper merged commit 09adbd0 into mongodb-labs:main Dec 9, 2024
49 checks passed
@FGasper FGasper deleted the felipe_log_lag_redux branch December 9, 2024 13:14
FGasper added a commit that referenced this pull request Dec 11, 2024
The previous logic (PR #74) was backwards, which caused uint overflow.

This adds a test that usually passes without this change but should occasionally fail. (It should always pass, though, with this change.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants