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

Method pipelineReadCmds

redis.go:1237–1252  ·  view source on GitHub ↗
(ctx context.Context, cn *pool.Conn, rd *proto.Reader, cmds []Cmder)

Source from the content-addressed store, hash-verified

1235}
1236
1237func (c *baseClient) pipelineReadCmds(ctx context.Context, cn *pool.Conn, rd *proto.Reader, cmds []Cmder) error {
1238 for i, cmd := range cmds {
1239 // To be sure there are no buffered push notifications, we process them before reading the reply
1240 if err := c.processPendingPushNotificationWithReader(ctx, cn, rd); err != nil {
1241 internal.Logger.Printf(ctx, "push: error processing pending notifications before reading reply: %v", err)
1242 }
1243 err := cmd.readReply(rd)
1244 cmd.SetErr(err)
1245 if err != nil && !isRedisError(err) {
1246 setCmdsErr(cmds[i+1:], err)
1247 return err
1248 }
1249 }
1250 // Retry errors like "LOADING redis is loading the dataset in memory".
1251 return cmds[0].Err()
1252}
1253
1254func (c *baseClient) txPipelineProcessCmds(
1255 ctx context.Context, cn *pool.Conn, cmds []Cmder,

Callers 2

pipelineProcessCmdsMethod · 0.95
txPipelineProcessCmdsMethod · 0.95

Calls 7

isRedisErrorFunction · 0.85
setCmdsErrFunction · 0.85
PrintfMethod · 0.65
readReplyMethod · 0.65
SetErrMethod · 0.65
ErrMethod · 0.65

Tested by

no test coverage detected