perf(spanner): Skip gRPC trailers for StreamingRead & ExecuteStreamingSql#11854
perf(spanner): Skip gRPC trailers for StreamingRead & ExecuteStreamingSql#11854sakthivelmanii merged 4 commits intomainfrom
Conversation
09dad19 to
1ff6dd5
Compare
| ResultSet *spannerpb.ResultSet | ||
| UpdateCount int64 | ||
| ResumeTokens [][]byte | ||
| Last bool |
There was a problem hiding this comment.
nit: can we rename this field to something like SetLastFlag. Now it seems like this flag is to indicate that this StatementResult is the last, but it has a different meaning than that.
spanner/read_test.go
Outdated
| t.Fatalf("ID Mismatch in the result") | ||
| } | ||
| } | ||
| if noOfRows != 1 { |
There was a problem hiding this comment.
nit: can we make at least one of these tests a bit more interesting by having more than 1 row?
1fecc1a to
1c32286
Compare
olavloite
left a comment
There was a problem hiding this comment.
LGTM, with some nits on the test cases
d8e42ee to
53142d8
Compare
ffbdc37 to
158b9f1
Compare
Skip gRPC trailers at the end of successful queries. See googleapis/google-cloud-go#11854
Skip gRPC trailers at the end of successful queries. See googleapis/google-cloud-go#11854
|
Hey team, I am chasing an issue with Spanner library, where we get "context canceled" in the traces, and I tracked the situation to v1.80.0 It only happens for Any thoughts? |
|
@yordis Can you please try https://github.com/googleapis/google-cloud-go/releases/tag/spanner%2Fv1.81.1, it has fix for this case. |
|
I will try |
|
If it's happening in 1.83.0 then it means that issue is still happening. Only possible case I can think of is, we cancel the context when doing iter.Stop() google-cloud-go/spanner/read.go Line 293 in c741391 and then if we try to actually receive the message here google-cloud-go/spanner/read.go Line 681 in c741391 @yordis in theory it should be happening for few ExecuteStreamingSql and not all the calls right? |
|
#12630 I just need help with the testing situation, I made it work and prove the brokeness, but still, I may need your help |
Yes, only
Yes |
I think we are doing |
Description:
gRPC trailers are headers that are sent after all the data messages are sent by the server in the stream. Trailers cause an additional latency of 250-300 μs after the last message in the stream. From the server, we will receive a
lastflag that tells us whether aPartialResultSetis the last in the stream, and we no longer need to wait for trailers to assume that all messages have been received.