Open jkowalski opened 4 years ago
Thanks for the bug report. Yes, the client should be concurrency safe - there are a couple of places where coordination is needed (credential refresh for example) and are guarded by mutexes.
I'll have a look at how this might be triggered and let you know what I find.
any updates here?
Sorry, nothing that I've been able to spot. There is a potential problem with rereading a buffer in the event of a retried upload request, but each upload should always use a new connection, so I'm not sure where the use of closed network connection
message could come from. Maybe related to the discussion here: https://github.com/golang/go/issues/21760
I'll try to find time to write some better tests around the uploads to try to reproduce the issue, any contribution in that area would be most welcome :)
Thanks for the provider. We're using it in https://github.com/kopia/kopia
I got a bug report from one of the users https://github.com/kopia/kopia/issues/547 reporting the provider sometimes returns errors like:
The calling code is in: https://github.com/kopia/kopia/blob/48f253173b7a0aa0a24ac30cdca755f730ea2ea5/repo/blob/b2/b2_storage.go#L180
I presume a single client is safe to be used concurrently by multiple goroutines. If that's indeed the case what could be the reason for the error?