I use Redis 6.2.4, and when I execute "setbit key 4294967296 1", it reports an error. but when I execute "bitfield key set u8 4294967295 1", it returns a value. Is this reasonable? Should the same error be returned as setbit?

127.0.0.1:> setbit key 4294967295 1 (integer) 0

127.0.0.1:> strlen key (integer) 536870912

127.0.0.1:> setbit key 4294967296 1 (error) ERR bit offset is not an integer or out of range

127.0.0.1:> bitfield key set u8 4294967295 1 1) (integer) 128

127.0.0.1:> strlen key (integer) 536870913

Comment From: oranagra

Hi, first, to overcome this limit, you'll need to tune proto-max-bulk-len config, which also controls the maximum string size in redis.

secondly, i'm not entirely sure what point you're trying to make, you used a different offset for these commands, the smaller one succeeds and the larger one fails (this is the behavior for both commands).

Comment From: guominghong

Hi, first, to overcome this limit, you'll need to tune proto-max-bulk-len config, which also controls the maximum string size in redis.

secondly, i'm not entirely sure what point you're trying to make, you used a different offset for these commands, the smaller one succeeds and the larger one fails (this is the behavior for both commands).

Thanks, My example is to show that the offset of the setbit command cannot exceed 2 ^ 32, but the bitfield set command can(4294967295 + 8 > 2^32). Shouldn't they behave the same way? because they are all bitmap commands。

Comment From: oranagra

you mean the off by one? or actually off by a few.. had you used u64 instead of u8 you'd manage to make it 8 bytes bigger. doesn't look like a real problem to me..

Comment From: guominghong

you mean the off by one? or actually off by a few.. had you used u64 instead of u8 you'd manage to make it 8 bytes bigger. doesn't look like a real problem to me..

Okay, got it. Thanks.