diff --git a/storage/writer.go b/storage/writer.go index dd468c5bf9e2..51d8b63779b8 100644 --- a/storage/writer.go +++ b/storage/writer.go @@ -174,10 +174,7 @@ func (w *Writer) open() error { // there is no need to add retries here. // Retry only when the operation is idempotent or the retry policy is RetryAlways. - var isIdempotent bool - if w.o.conds != nil && (w.o.conds.GenerationMatch >= 0 || w.o.conds.DoesNotExist == true) { - isIdempotent = true - } + isIdempotent := w.o.conds != nil && (w.o.conds.GenerationMatch >= 0 || w.o.conds.DoesNotExist == true) var useRetry bool if (w.o.retry == nil || w.o.retry.policy == RetryIdempotent) && isIdempotent { useRetry = true