cmdsContainNoRetry returns true if any command in the slice has NoRetry() == true. If a pipeline contains a non-retryable command (e.g., RawWriteToCmd), the entire pipeline must not be retried to prevent data corruption from partial writes.
(cmds []Cmder)
| 258 | // If a pipeline contains a non-retryable command (e.g., RawWriteToCmd), the entire |
| 259 | // pipeline must not be retried to prevent data corruption from partial writes. |
| 260 | func cmdsContainNoRetry(cmds []Cmder) bool { |
| 261 | for _, cmd := range cmds { |
| 262 | if cmd.NoRetry() { |
| 263 | return true |
| 264 | } |
| 265 | } |
| 266 | return false |
| 267 | } |
| 268 | |
| 269 | func writeCmds(wr *proto.Writer, cmds []Cmder) error { |
| 270 | for _, cmd := range cmds { |
no test coverage detected