Use DeadlineExceeded error when creating stream failed by timeout #334
No reviewers
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
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#334
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-sdk-go:fix/api_client_timeout_error"
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?
According to https://pkg.go.dev/context#pkg-variables, context.Cancelled should be returned when the context is canceled for some reason other than its deadline passing. So creating gRPC stream with dial timeout fits better for context.DeadlineExceeded.
This also affects failover scenarios, as context.Cancelled does not lead to attempts to use other node addresses:
success := err == nil || errors.Is(err, context.Canceled) || errors.As(err, &siErr) || errors.As(err, &eiErr)
81bc841ba3
to56892e48ac
Also TrueCloudLab/frostfs-node#1589 (comment)