tracing: Fix panic on closed channel #24
No reviewers
TrueCloudLab/storage-core-committers
TrueCloudLab/storage-core-developers
Labels
No labels
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 project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-api-go#24
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-api-go:fix/tracing-panic"
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?
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.