(stream io.Reader)
| 567 | } |
| 568 | |
| 569 | func toString(stream io.Reader) (string, error) { |
| 570 | buf := new(bytes.Buffer) |
| 571 | |
| 572 | _, err := buf.ReadFrom(stream) |
| 573 | if err != nil { |
| 574 | return "", err |
| 575 | } |
| 576 | |
| 577 | return bytes.NewBuffer(buf.Bytes()).String(), nil |
| 578 | } |
| 579 | |
| 580 | // clickhouseRecoverableStatusCodes set of recoverable http responses' status codes from Clickhouse. |
| 581 | // When such happens we mark transaction as completed and let concurrent query to hit another Clickhouse shard. |