Skip to content

​​Multiple cmd.err are set to redis.Nil when one cmd returns redis.Nil​​ #3527

@yvvlee

Description

@yvvlee

Expected Behavior

var cmd1,cmd2 *StringCmd _, err := client.Pipelined(ctx, func(pipeliner redis.Pipeliner) error { cmd1 = pipeliner.Get(ctx, key1) //key1 is not exist, and it will return redis.Nil cmd2 = pipeliner.Get(ctx, key2) //key2 is exist. return nil	}) fmt.Println(cmd2.Err()) // Expected nil

Current Behavior

var cmd1,cmd2 *StringCmd _, err := client.Pipelined(ctx, func(pipeliner redis.Pipeliner) error { cmd1 = pipeliner.Get(ctx, key1) //key1 is not exist, and it will return redis.Nil cmd2 = pipeliner.Get(ctx, key2) //key2 is exist. return nil	}) fmt.Println(cmd2.Err()) // Current return redis.Nil

Context (Environment)

redis.go:633

Image

https://github.com/redis/go-redis/pull/3509/files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions