[#254] pool: Add parameter gracefulCloseOnSwitchTimeout #255

Merged
fyrchik merged 1 commit from dkirillov/frostfs-sdk-go:feature/254-pool_gracefull_client_switch into master 2024-08-22 08:02:52 +00:00
Member

Add new param for waiting a little until current in-flight requests will be finished

close #254

Add new param for waiting a little until current in-flight requests will be finished close #254
dkirillov self-assigned this 2024-08-19 14:55:18 +00:00
dkirillov added 1 commit 2024-08-19 14:55:22 +00:00
[#254] pool: Add parameter gracefulCloseOnSwitchTimeout
All checks were successful
DCO / DCO (pull_request) Successful in 37s
Tests and linters / Tests (1.21) (pull_request) Successful in 53s
Tests and linters / Tests (1.22) (pull_request) Successful in 54s
Tests and linters / Lint (pull_request) Successful in 1m38s
c416a37ce1
Add new param for waiting a little until current in-flight requests will be finished

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
fyrchik reviewed 2024-08-19 14:57:48 +00:00
@ -1229,0 +1248,4 @@
return
}
time.AfterFunc(c.prm.gracefulCloseOnSwitchTimeout, func() {
Owner

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?

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?
Author
Member

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)

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)
Owner

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.

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.
Author
Member

This timeout isn't affect swtitching logic because when we switch back we invoke dial and get new connection.

This timeout isn't affect swtitching logic because when we switch back we invoke `dial` and get new connection.
dkirillov requested review from storage-core-committers 2024-08-20 06:08:19 +00:00
dkirillov requested review from storage-core-developers 2024-08-20 06:08:20 +00:00
dkirillov requested review from storage-sdk-committers 2024-08-20 06:08:20 +00:00
dkirillov requested review from storage-sdk-developers 2024-08-20 06:08:21 +00:00
dkirillov requested review from storage-services-committers 2024-08-20 06:08:23 +00:00
dkirillov requested review from storage-services-developers 2024-08-20 06:08:23 +00:00
fyrchik approved these changes 2024-08-20 08:14:25 +00:00
acid-ant approved these changes 2024-08-20 14:54:02 +00:00
aarifullin approved these changes 2024-08-22 07:46:17 +00:00
fyrchik merged commit 28f140bf06 into master 2024-08-22 08:02:52 +00:00
dkirillov deleted branch feature/254-pool_gracefull_client_switch 2024-08-26 09:39:13 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-sdk-developers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-sdk-go#255
No description provided.