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

RUST-1631 Always use polling monitoring when running in a FaaS environment #1030

Merged
merged 8 commits into from
Feb 21, 2024

Conversation

abr-egn
Copy link
Contributor

@abr-egn abr-egn commented Feb 15, 2024

RUST-1631

The core change is pretty simple - add some behavior to switch back to polling when FaaS is detected - but there's a lot of stuff around that (tests, URI config, etc.)

@@ -34,10 +34,12 @@ impl Stats {

fn handle_sdam(&mut self, event: &SdamEvent) {
match event {
SdamEvent::ServerHeartbeatStarted(_) => {
SdamEvent::ServerHeartbeatStarted(ev) => {
assert!(!ev.awaited);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rather than setting patchable: true so this is included in the evergreen runs and then (forget to) change it back before submitting, I just did an independent run for that.

@@ -102,13 +117,19 @@ impl Monitor {
while self.is_alive() {
let check_succeeded = self.check_server().await;

if self.topology_version.is_some() && self.allow_streaming {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The spec changed from allowing drivers to use a dedicated RTT monitor even when polling to requiring that one not be used when polling, so starting up that task had to be deferred to the point where we know whether polling is happening or not.

@abr-egn abr-egn marked this pull request as ready for review February 15, 2024 17:56
@abr-egn abr-egn merged commit 4d9a320 into mongodb:main Feb 21, 2024
11 of 15 checks passed
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