redis / rueidis

A fast Golang Redis client that supports Client Side Caching, Auto Pipelining, Generics OM, RedisJSON, RedisBloom, RediSearch, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IsReadOnly() of Redis streams readonly command with BLOCK should return true

tamayika opened this issue · comments

Current implementation overrides readonly flag with block flag.
readonly flag: https://github.com/redis/rueidis/blob/main/internal/cmds/gen_stream.go#L1039
block flag: https://github.com/redis/rueidis/blob/main/internal/cmds/gen_stream.go#L1050

Block tag should be set like blow?

	c.cf |= int16(blockTag)

Current implementation overrides readonly flag with block flag. readonly flag: https://github.com/redis/rueidis/blob/main/internal/cmds/gen_stream.go#L1039 block flag: https://github.com/redis/rueidis/blob/main/internal/cmds/gen_stream.go#L1050

Block tag should be set like blow?

	c.cf |= int16(blockTag)

Hi @tamayika,

Yes, I think it should be like that.

Would you like to help us fix here?

fmt.Fprintf(w, "\tc.cf = int16(blockTag)\n")

And rerun the go generate.

@rueian

OK, I made a PR