Skip to content

Commit

Permalink
ch retries: also retry on io.EOF (#2122)
Browse files Browse the repository at this point in the history
clickhouse-go error may not be exception when it propagates io errors,
io.EOF is indicative of a disconnect, which should be retried
  • Loading branch information
serprex authored Oct 2, 2024
1 parent 064a2a9 commit 5d847b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flow/connectors/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"crypto/x509"
"errors"
"fmt"
"io"
"log/slog"
"maps"
"net/url"
Expand Down Expand Up @@ -296,7 +297,7 @@ func isRetryableException(err error) bool {
_, yes := retryableExceptions[ex.Code]
return yes
}
return false
return errors.Is(err, io.EOF)
}

//nolint:unparam
Expand Down

0 comments on commit 5d847b5

Please sign in to comment.