Skip to content

Commit

Permalink
[pxapi] Allow streaming queries to reconnect if stream ends without t…
Browse files Browse the repository at this point in the history
…railers (#1227)

Summary: The `perf-eval` github action was often failing because the
data loss streaming pxl script would fail with error "server closed the
stream without sending trailers". It seems like this happens similarly
to `RST_STREAM` when someone on the TCP chain decides to give up on the
connection. This diff allows the script to try to reconnect if this
error occurs. I tested the perf eval using these changes and it no
longer errors with the above error.

Type of change: /kind cleanup

Test Plan: Tested a perf eval with a streaming query and saw that it
successfully completed without running into any "server closed the
stream ..." errors.

Signed-off-by: James Bartlett <[email protected]>
GitOrigin-RevId: a7f8a26e9fd5f12443fe819c52ef35c51d354ab1
  • Loading branch information
JamesMBartlett authored and copybaranaut committed Apr 24, 2023
1 parent 995522e commit 0d3f425
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions results.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ func isTransientGRPCError(err error) bool {
if s.Code() == codes.Internal && strings.Contains(s.Message(), "RST_STREAM") {
return true
}
if s.Code() == codes.Internal && strings.Contains(s.Message(), "server closed the stream without sending trailers") {
return true
}
return false
}

Expand Down

0 comments on commit 0d3f425

Please sign in to comment.