tracing: Fix panic on closed channel #24
No reviewers
TrueCloudLab/storage-core-committers
TrueCloudLab/storage-core-developers
Labels
No Label
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-api-go#24
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "dstepanov-yadro/frostfs-api-go:fix/tracing-panic"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Related TrueCloudLab/frostfs-node#263
Closed channel is also ready for communication, so select statement can write to it.
e5dd1004a1
to30c5a0f55c
@ -51,7 +51,6 @@ func NewGRPCStreamClientInterceptor() grpc.StreamClientInterceptor {
strWrp := newgRPCClientStream(str, desc, finished, done)
go func() {
defer close(finished)
Who will close it then?
No one will close this channel. After goroutine closes
done
channel no one can write tofinished
. After GC collects stream, it will be no readers and no writers. It's ok to leave channel open: https://groups.google.com/g/golang-nuts/c/pZwdYRGxCIk/m/qpbHxRRPJdUJSorry, pressed merge button mechanically without enough approvals.