Skip to content

Commit

Permalink
Make RetryCount a private const
Browse files Browse the repository at this point in the history
  • Loading branch information
marco6 committed Jun 27, 2024
1 parent 6a420e5 commit 00ff2cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/kine/drivers/generic/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var (
) AS high`
)

var RetryCount = 500
const retryCount = 500

type Stripped string

Expand Down Expand Up @@ -335,7 +335,7 @@ func (d *Generic) query(ctx context.Context, txName, sql string, args ...interfa
}()

strippedSQL := Stripped(sql)
for ; i < RetryCount; i++ {
for ; i < retryCount; i++ {
if i > 2 {
logrus.Debugf("QUERY (try: %d) %v : %s", i, args, strippedSQL)
} else {
Expand Down Expand Up @@ -440,7 +440,7 @@ func (d *Generic) executePrepared(ctx context.Context, txName, sql string, prepa
}

strippedSQL := Stripped(sql)
for ; i < RetryCount; i++ {
for ; i < retryCount; i++ {
if i > 2 {
logrus.Debugf("EXEC (try: %d) %v : %s", i, args, strippedSQL)
} else {
Expand Down Expand Up @@ -476,7 +476,7 @@ func (d *Generic) GetCompactRevision(ctx context.Context) (int64, int64, error)
return 0, 0, fmt.Errorf("denied: %w", err)
}

for i := 0; i < RetryCount; i++ {
for i := 0; i < retryCount; i++ {
if i > 2 {
logrus.Debugf("EXEC (try: %d): %s", i, revisionIntervalSQL)
} else {
Expand Down

0 comments on commit 00ff2cd

Please sign in to comment.