Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of expected error codes coming from grpc storage plugins #1741 #1814

Merged
merged 6 commits into from
Oct 9, 2019
Next Next commit
Handling of expected error codes coming from grpc storage plugins #1741
Signed-off-by: chandresh-pancholi <chandreshpancholi007@gmail.com>
  • Loading branch information
chandresh-pancholi committed Sep 24, 2019
commit 932f718be519a0ef55d46d7c1fd0d7b509a6169c
2 changes: 1 addition & 1 deletion plugin/storage/grpc/shared/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (c *grpcClient) GetTrace(ctx context.Context, traceID model.TraceID) (*mode
trace := model.Trace{}
for received, err := stream.Recv(); err != io.EOF; received, err = stream.Recv() {
if err != nil {
return nil, errors.Wrap(err, "grpc stream error")
return nil, spanstore.ErrTraceNotFound
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right, why are you assuming that EVERY error from gRPC is "trace not found"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

}

for i := range received.Spans {
Expand Down