go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

Make `MaxRetries` field of `ClusterOptions` follow same format as `Options`

Open leejseo opened this issue 2 years ago • 0 comments

This PR makes MaxRetries field of ClusterOptions to have default MaxRetries value of 3, following same format of RingOptions and Options.

  • RingOptions code pointer: https://github.com/redis/go-redis/blob/master/ring.go#L119-L123
  • Options code pointer: https://github.com/leejseo/go-redis/blob/master/options.go#L196-L200

I created this PR since I thought its kind of weird that default zero value of other option leads to the max number of retry 3 while only this option leads to no retry.

(Since this is my first time contributing to go-redis project, I would not be familiar with the convention and I might not know correctly about the rationale beyond the code. I apprieciate any feedbacks about this PR.)

leejseo avatar Oct 31 '23 18:10 leejseo