treasure-data / trino-client-ruby

Trino/Presto client library for Ruby
Apache License 2.0
70 stars 45 forks source link

fix: Retry GET against 502, 503 and 504 responses #129

Closed kar0t closed 2 weeks ago

kar0t commented 2 weeks ago

Purpose

Retry GET against 502, 504 responses.

Overview

According to the trino client protocol, it should also retry for 502 and 504. (https://github.com/treasure-data/trino-client-ruby/issues/128)

https://trino.io/docs/current/develop/client-protocol.html#overview-of-query-processing If the client request returns an HTTP 502, 503, or 504, that means there was an intermittent problem processing request and the client should try again in 50-100 ms. Trino does not generate those codes by itself, but those can be generated by load balancers in front of Trino.

Checklist

kar0t commented 2 weeks ago

Hi, @yuokada, @ybiquitous maintainers. Can I ask for a code review of this PR?

kar0t commented 2 weeks ago

Close #128