-
Notifications
You must be signed in to change notification settings - Fork 50
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
feat: Manually update the spanner session approximate_last_used_time #1009
Merged
Merged
Changes from 8 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d1705ba
feat: Manually update the spanner session approximate_last_used_time
jrconlin 527723b
f fmt/clippy
jrconlin 0aa3455
f r's
jrconlin d40cf90
f fmt
jrconlin 9af8053
f add retry logic for `execute_*_async()`
jrconlin ff3fcc5
f revert the connection retries
jrconlin 3622a37
f fmt
jrconlin 2b14f24
f add comment
jrconlin 4e76fec
Merge branch 'master' of github.com:mozilla-services/syncstorage-rs i…
jrconlin 5daa487
f add self generated times
jrconlin ee7e6f3
f update cargo
jrconlin a94061a
Merge branch 'master' of github.com:mozilla-services/syncstorage-rs i…
jrconlin bd6e03d
Merge branch 'master' into bug/1008-lut
jrconlin d690989
f r's
jrconlin 7cdcd48
Merge branch 'bug/1008-lut' of github.com:mozilla-services/syncstorag…
jrconlin 1bea087
f r's
jrconlin a616ee5
f add a possible warning, because I'm paranoid.
jrconlin 4412118
f fmt
jrconlin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Sorry, forgot to get back around to this last week.
The last conversation we had about this I had a realization: the
create_time/approximate_last_use_time
stats we've begun using are for the SpannerSession
but the GOAWAYs are likely more about the lower level GRPC connection/channel.The case Err(e) => block below potentially recreates sessions on existing channels. In that case the
Session
create_time
doesn't tell us about the GRPC channel but instead aSession
possibly created much later than the original channel was.The point of all this:
max_life/idle
events. Instead of recreating the session here, let'sreturn Err(DbErrorKind::Expired.into())
which should cause deadpool to drop ourSpannerSession
struct (which is a confusing name here, it's really a combination of both the SpannerClient with its underlying grpcio::Channel and the spanner Session on top of it). Drop of thegrpcio::Channel
will disconnect it.Session
start_time
could be different from the parent channel's (though I think its idle time would always be accurate?) I'm fine punting on this for now though (doing it later in a separate PR) because theSession
's version probably doesn't differ very often -- with thereturn Err(
change this should hopefully avoid a significant amount of our GOAWAYS as is. 🤷♂️