-
Notifications
You must be signed in to change notification settings - Fork 649
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
Keepalive bugfixes and unify timers strategies between client and server #2760
Keepalive bugfixes and unify timers strategies between client and server #2760
Commits on May 28, 2024
-
Serverside keepalive error detection and cleanups
- Bugfix: Ensure that if session.ping returns false we correctly identify fail the keepalive and connection - Bugfix: Ensure that if the interval between keepalives being sent occurs faster than the prior keepalive's timeout that we do not overwrite the reference to the prior timeout. Prior implementation could have in theory prevented a valid keepalive timeout from clearing itself. This rewrite keeps every timeout as a local (vs a shared state per session). Even if the timeout outlives the lifetime of a session, we still guard against errors by checking that the parent interval is not false-y. I reckon this could result in a short-term memory leak per session which is bounded for a maximum of keepaliveTimeoutMs. On the other hand even with that potential for a short reference hold, this implementation proposed here is more correct I think. One alternative we could do is keep a list of pending timeouts.. which is complex for a rare situation that will self resolve anyhow when keepaliveTimeoutMs is reached. - Bug Fix: keepalive intervals were being cleared with an incorrect clearTimeout before. Not sure if this was causing intervals leaks in some nodejs impls or not. (v20.13.1 seems to accept this mismatch without issue) - Rename variables for clarity, to prevent future bugs like swapping clearInterval vs clearTimeout. - Implementation is repeated in two places, per warning from grpc#2756 (comment) - This commit supercedes the prior PR on a master branch which was out of date. grpc#2756
Configuration menu - View commit details
-
Copy full SHA for ad598ec - Browse repository at this point
Copy the full SHA ad598ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 334f0dc - Browse repository at this point
Copy the full SHA 334f0dcView commit details
Commits on May 29, 2024
-
unify server and client keepalive matching comments and discussion on…
… first round of review from grpc#2760
Configuration menu - View commit details
-
Copy full SHA for d799a7a - Browse repository at this point
Copy the full SHA d799a7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 577b4b4 - Browse repository at this point
Copy the full SHA 577b4b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7883164 - Browse repository at this point
Copy the full SHA 7883164View commit details -
Configuration menu - View commit details
-
Copy full SHA for 19cdc12 - Browse repository at this point
Copy the full SHA 19cdc12View commit details -
Configuration menu - View commit details
-
Copy full SHA for bed5e85 - Browse repository at this point
Copy the full SHA bed5e85View commit details -
Configuration menu - View commit details
-
Copy full SHA for d325b5f - Browse repository at this point
Copy the full SHA d325b5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a77d94f - Browse repository at this point
Copy the full SHA a77d94fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2da436 - Browse repository at this point
Copy the full SHA c2da436View commit details
Commits on Jun 6, 2024
-
per discussion, avoid tracking keepalive disabled state and instead d…
…epend on whether the session is destroyed
Configuration menu - View commit details
-
Copy full SHA for 3c5ab22 - Browse repository at this point
Copy the full SHA 3c5ab22View commit details
Commits on Jun 7, 2024
-
ensure that client keepalive timers are always cleared when they trig…
…ger. this is a necessary change to fit with having removed keepaliveDisabled boolean. manually inspected test logs for both server.ts and transport.ts to verify both types of keepalives are operating correctly.
Configuration menu - View commit details
-
Copy full SHA for 98cd87f - Browse repository at this point
Copy the full SHA 98cd87fView commit details