[#254] pool: Add parameter gracefulCloseOnSwitchTimeout #255
No reviewers
TrueCloudLab/storage-sdk-developers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
Labels
No labels
P0
P1
P2
P3
good first issue
pool
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#255
Loading…
Reference in a new issue
No description provided.
Delete branch "dkirillov/frostfs-sdk-go:feature/254-pool_gracefull_client_switch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add new param for waiting a little until current in-flight requests will be finished
close #254
@ -1229,0 +1248,4 @@
return
}
time.AfterFunc(c.prm.gracefulCloseOnSwitchTimeout, func() {
Could you explain how this works?
So instead of closing immediately, we close after some time.
Why no new requests could arrive in the meantime?
At this time current client marked as unhealhty, so new request don't use this connection. Also after invoking such delayed close we invoke new dial, so client will contain brand new connection (despite the old one hasn't yet been closed)
Can this timeout affect switching logic?
e.g. we mark some endpoint as unhealthy, then switch back to it, but this switch timeout is lower than the graceful timeout here.
This timeout isn't affect swtitching logic because when we switch back we invoke
dial
and get new connection.