Skip to content

CSHARP-5204: Test Heartbeats don't gossip cluster time #1665

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

Merged
merged 4 commits into from
Apr 28, 2025

Conversation

adelinowona
Copy link
Contributor

It turns out we were already not gossiping cluster times in our monitoring connections. Our monitors send hello requests which use a NoCoreSession instance when the wire protocol command is created for a hello request. A NoCoreSession instance has a null ClusterTime which cannot be changed and calling session.AdvanceClusterTime is also a no-op for a NoCoreSession. So this PR just adds the new prose test described in the Drivers spec update: mongodb/specifications@b76cbf9

@adelinowona adelinowona requested a review from a team as a code owner April 8, 2025 05:50
@adelinowona adelinowona requested review from JamesKovacs and BorisDog and removed request for a team and JamesKovacs April 8, 2025 05:50
@adelinowona adelinowona added the chore Label to hide PR from generated Release Notes label Apr 8, 2025
Copy link
Contributor

@BorisDog BorisDog left a comment

Choose a reason for hiding this comment

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

Looks good overall. Some question regarding the timings + failed test on EG.

Copy link
Member

@sanych-sun sanych-sun left a comment

Choose a reason for hiding this comment

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

Please check Evergreen failures, as new test is failing for some variants.

Copy link
Contributor

@BorisDog BorisDog left a comment

Choose a reason for hiding this comment

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

LGTM.
I've scheduled additional EG tasks to test stability of this test. Please double check that.

{
var capturedEvents = events.ToArray();
return capturedEvents.Count(e => e is ServerHeartbeatSucceededEvent) > 1 &&
capturedEvents
Copy link
Member

Choose a reason for hiding this comment

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

I think this code could be simplified a little by using the following approach:

capturedEvents
    .SkipUntil(e => <first event condition>)
    .Any(e => <second event condition>)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. thanks!

@adelinowona adelinowona requested a review from sanych-sun April 24, 2025 19:42

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Member

@sanych-sun sanych-sun left a comment

Choose a reason for hiding this comment

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

LGTM

@adelinowona adelinowona merged commit 1d0c791 into mongodb:main Apr 28, 2025
19 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Label to hide PR from generated Release Notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants