MCPcopy
hub / github.com/redis/go-redis / cmdsContainNoRetry

Function cmdsContainNoRetry

command.go:260–267  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
260func cmdsContainNoRetry(cmds []Cmder) bool {
261 for _, cmd := range cmds {
262 if cmd.NoRetry() {
263 return true
264 }
265 }
266 return false
267}
268
269func writeCmds(wr *proto.Writer, cmds []Cmder) error {
270 for _, cmd := range cmds {

Callers 4

pipelineReadCmdsMethod · 0.85

Calls 1

NoRetryMethod · 0.65

Tested by

no test coverage detected