Skip to content

GODRIVER-2577 Retry heartbeat on timeout to prevent pool cleanup in FAAS pause. #1133

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
Dec 2, 2022

Conversation

qingyang-hu
Copy link
Collaborator

GODRIVER-2577

Summary

This fix retries heartbeat on timeout errors to delay pool cleanup by one event loop.

Background & Motivation

Pausing behavior in FAAS environment, e.g. AWS Lambda, causes connection timeout in heartbeat, which then clears the pool.
This fix retries heartbeats on timeout so only two continuous timeout errors will trigger a pool cleanup.
Its test case uses a proxy net.Conn to mimic timeout errors.

@qingyang-hu qingyang-hu force-pushed the godriver2577 branch 13 times, most recently from 2ab94d1 to c2e0b77 Compare November 18, 2022 18:53
Copy link
Contributor

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

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

Great work so far! 🧑‍🔧

Copy link
Contributor

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

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

Changes look good! Still have some open questions (my unresolved threads).

@benjirewis benjirewis self-requested a review November 28, 2022 17:29
Copy link
Contributor

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! 🧑‍🔧

Copy link
Collaborator

@matthewdale matthewdale 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 👍

@qingyang-hu qingyang-hu merged commit 4c4c61b into mongodb:master Dec 2, 2022
benjirewis pushed a commit that referenced this pull request Dec 6, 2022
benjirewis pushed a commit that referenced this pull request Dec 6, 2022
prestonvasquez pushed a commit to prestonvasquez/mongo-go-driver that referenced this pull request Dec 8, 2022
prestonvasquez added a commit that referenced this pull request Dec 8, 2022
* GODRIVER-2651 Break NoWritesPerformed-Only Error Sequence (#1135)

Co-authored-by: Qingyang Hu <[email protected]>
Co-authored-by: Benjamin Rewis <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
Co-authored-by: Qingyang Hu <[email protected]>
Co-authored-by: Benjamin Rewis <[email protected]>

* GODRIVER-2333 Assert that Ping op succeeds  initial DNS spec tests (#1124)

* GODRIVER-2577 Retry heartbeat on timeout to prevent pool cleanup in FAAS pause. (#1133)

* resolve merge conflicts

Co-authored-by: Qingyang Hu <[email protected]>
Co-authored-by: Benjamin Rewis <[email protected]>
Co-authored-by: Kevin Albertson <[email protected]>
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.

3 participants