Skip to content

Commit 4b2284e

Browse files
committed
review
1 parent c7f7ba7 commit 4b2284e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

flow/pkg/clickhouse/query_retry.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ var retryableExceptions = map[chproto.Error]struct{}{
3636
chproto.ErrKeeperException: {},
3737
}
3838

39-
// conditionallyRetryableExceptions are error codes that are only retryable
40-
// when the error message contains one of the specified substrings
41-
var conditionallyRetryableExceptions = map[chproto.Error][]string{
39+
var retryableExceptionSubstrings = map[chproto.Error][]string{
4240
chproto.ErrStdException: {"unspecified iostream_category error"},
4341
}
4442

@@ -51,7 +49,7 @@ func isRetryableException(err error) bool {
5149
if _, ok := retryableExceptions[code]; ok {
5250
return true
5351
}
54-
if substr, ok := conditionallyRetryableExceptions[code]; ok {
52+
if substr, ok := retryableExceptionSubstrings[code]; ok {
5553
msg := ex.Error()
5654
for _, s := range substr {
5755
if strings.Contains(msg, s) {

0 commit comments

Comments
 (0)