redis/lettuce

Why bitField offset argument is int type?

psw0946 opened this issue · 9 comments

Feature Request

Is your feature request related to a problem? Please describe

I have an issue when I try to do bitfield with set subcommands.
But, when I pass offset argument with a long value, it emits an error with message,

Offset must be greater or equal to 0
java.lang.IllegalArgumentException: Offset must be greater or equal to 0
...

When I pass integer value offset, it succeeds.

I can pass a long value offset with redis-cli, but is there any reason for lettuce to declare offset with int type?

Describe the solution you'd like

BitFieldArgs Offset inner classes declare the offset field with int type. (BitFieldArgs.java)
Maybe, we can just change the offset type to long. But, we should limit the offset value to 512 MB.

Apologies for the late reply on this topic.

Could you please share the exact code that lead to this issue? A minimum reproducible example would be perfect!

I am not exactly sure which code path you are following and could not give a good answer whether this is a bug or not.