Interceptors and metadata

49 views
Skip to first unread message

Jaana Burcu Dogan

unread,
Apr 28, 2017, 5:29:24 PM4/28/17
to grpc.io
Hello all,

I was not able to find any good practices around modifying metadata in interceptors. We have the following interceptor and it fails when the same ctx is used to invoke multiple calls concurrently due to metadata race: https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/trace/grpc.go#L40

What's the suggested method here? Should we always copy the invoker ctx's metadata in interceptors?

Thanks,
jbd

Jaana Burcu Dogan

unread,
Apr 28, 2017, 5:32:14 PM4/28/17
to grpc.io
Ah, I realized the metadata.FromContext is deprecated and replacements are explaining what I should do.

Sorry for the noise.
Reply all
Reply to author
Forward
0 new messages