-
Notifications
You must be signed in to change notification settings - Fork 455
CDRIVER-3997 Use "hello" command for monitoring if supported #797
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
Conversation
f730c4d
to
5ccd330
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to review tests, but I looked at all implementation changes.
@alcaeus I think this PR might be missing some updated spec tests. While syncing spec tests for CDRIVER-3895 I pulled in changes from mongodb/specifications@3385a12. I cross-referenced those changes with a related CDRIVER ticket and ended up here, but noticed that some files (e.g. |
@jmikola interesting. I'll give the spec tests another look separately from this PR. |
@kevinAlbs the last commit updates the test to ensure that closing the connection after a handshake reverts back to correctly using legacy hello, regardless of whether the server previously responded with helloOk. That should complete this work. |
@kevinAlbs I'm at a loss why some builds are failing with a "redundant declaration" warning: https://evergreen.mongodb.com/task_log_raw/mongo_c_driver_releng_compile_tracing_patch_f1093ba1686b8bf876eed67e0c7f59918649ef15_60cb1b3ca4cf473aac7310aa_21_06_17_09_51_58/0?type=T#L345. Got any pointers for me? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great! Just a few last comments.
@kevinAlbs I'm at a loss why some builds are failing with a "redundant declaration" warning: evergreen.mongodb.com/task_log_raw/mongo_c_driver_releng_compile_tracing_patch_f1093ba1686b8bf876eed67e0c7f59918649ef15_60cb1b3ca4cf473aac7310aa_21_06_17_09_51_58/0?type=T#L345. Got any pointers for me?
I think moving _mongoc_topology_set_server_api
above the last #endif
so it is inside the include guard should do the trick.
This is not necessary since we don't rely on hello_ok if an API version was declared This partially reverts commit 7d58f04.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* Handle helloOk flag in server description * Refactor handshake command naming * Use hello command after seeing helloOk in legacy hello response * Fix 5.0 test * Update SDAM spec tests to latest version * Reset hello_ok in mongoc_server_description_reset only * Don't update initial server description in server monitor * Always build legacy_hello_cmd with legacy hello command * Test fallback to legacy hello after connection is closed * Update wrong comment Co-authored-by: Kevin Albertson <[email protected]> * Don't modify legacy_hello_cmd when using versioned API * Lock topology mutex before obtaining server description * Don't update hello_ok when declaring API version This is not necessary since we don't rely on hello_ok if an API version was declared This partially reverts commit 7d58f04. * Remove early return when reconciling scanner nodes Co-authored-by: Kevin Albertson <[email protected]>
…ongodb#797)" This reverts commit d261727.
CDRIVER-3997
The first commit are squashed changes from #794 which I'll remove before merging this PR. I suggest reviewing this PR commit by commit.This PR syncs the spec tests to the latest version from mongodb/specifications#990.