Skip to content

Commit

Permalink
fix(repair): remove default timeout from RepairStatus
Browse files Browse the repository at this point in the history
Since StorageServiceRepairStatus (without timeout param) returns only when the repair job has finished, we shouldn't time out on our end (even if backoff retry could handle that).

This resulted in many backoff errors in SM logs even on successful repair:
{"L":"INFO","T":"2023-12-01T01:31:54.398Z","N":"cluster.client","M":"HTTP retry backoff","operation":"StorageServiceRepairStatus","wait":"28.607063257s","error":"after 16m0s: context deadline exceeded","_trace_id":"uqSjtDSfRoOl1WhetiLPgA"}
  • Loading branch information
Michal-Leszczynski authored and karol-kokoszka committed Feb 26, 2024
1 parent cf88be8 commit d9e814c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/scyllaclient/client_scylla.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,12 @@ func repairStatusShouldRetryHandler(err error) *bool {
return nil
}

const repairStatusTimeout = 30 * time.Minute

// RepairStatus waits for repair job to finish and returns its status.
func (c *Client) RepairStatus(ctx context.Context, host string, id int32) (CommandStatus, error) {
ctx = forceHost(ctx, host)
ctx = customTimeout(ctx, repairStatusTimeout)
ctx = withShouldRetryHandler(ctx, repairStatusShouldRetryHandler)
var (
resp interface {
Expand Down

0 comments on commit d9e814c

Please sign in to comment.