-
Notifications
You must be signed in to change notification settings - Fork 180
RUST-803 Conditionally use hello
for monitoring
#600
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
RUST-803 Conditionally use hello
for monitoring
#600
Conversation
Oh I just realized the grep I was using missed a lot of the legacy hellos, will push a new commit that fixes those. |
src/test/util/mod.rs
Outdated
@@ -82,14 +82,10 @@ impl TestClient { | |||
.await; | |||
session.mark_dirty(); | |||
|
|||
let is_master = | |||
RunCommand::new("admin".into(), doc! { "isMaster": 1 }, None, None).unwrap(); | |||
let hello = RunCommand::new("admin".into(), doc! { "isMaster": 1 }, None, None).unwrap(); |
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.
Should this be using "hello"
?
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 one I thought was required, since it's essentially an initial handshake. I realized that I can just reuse the hello_command
method though, so I've updated it to that.
|
||
#[cfg_attr(feature = "tokio-runtime", tokio::test)] | ||
#[cfg_attr(feature = "async-std-runtime", async_std::test)] | ||
async fn basic() { |
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 test seemed to be sufficiently covered by our end-to-end integration tests and is a bit too specific to the implementation, so I just decided to remove it rather than try to accommodate any more changes to it.
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.
couple small things but LGTM otherwise
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!
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!
RUST-803
This PR updates the monitors in the driver to make use of
helloOk
, a new (in 4.4.5) flag to the legacy hello command which can be used to determine if the server supports the newhello
command. If it echos backhelloOk: true
, all subsequent monitor checks should usehello
instead of the legacy hello command. The initial check needs to always be legacy though in case the server doesn't support the newer one.The SDAM tests were synced as part of this.
There are a few remaining instances of the legacy hello command in the driver, all used for initial information requests or for deserialization purposes.