Skip to content

BITFIELD behaves differently if called multiple times #3564

@mp911de

Description

@mp911de

Consider following command sequence:

127.0.0.1:6379> flushall
OK
127.0.0.1:6379> BITFIELD mystring SET i8 0 10 SET i8 64 10 INCRBY i8 10 99900
1) (integer) 0
2) (integer) 0
3) (integer) 60
127.0.0.1:6379> flushall
OK
127.0.0.1:6379> BITFIELD mystring SET i8 0 10 SET i8 64 10 INCRBY i8 10 99900
1) (integer) 0
2) (integer) 50
3) (integer) 60
127.0.0.1:6379> flushall
OK
127.0.0.1:6379> BITFIELD mystring SET i8 0 10 SET i8 64 10 INCRBY i8 10 99900
1) (integer) 0
2) (integer) 8
3) (integer) 60
127.0.0.1:6379> 

If you look at the output of the second subcommand you see the output is 2) (integer) 0 on the first call and 2) (integer) 50 on the second call.

A FLUSHALL and restart after the BITFIELD command was run the first time produces consistent results.

Server

redis_version:3.2.4
redis_git_sha1:070d0471
redis_git_dirty:0
redis_build_id:2a16b085f0aaf046
redis_mode:standalone
os:Darwin 15.6.0 x86_64
arch_bits:64
multiplexing_api:kqueue
gcc_version:4.2.1
process_id:69460
run_id:9b4e088b2a092f3e973450524fdca2be6b6ea437
tcp_port:6379
uptime_in_seconds:335
uptime_in_days:0
hz:10
lru_clock:645669
executable:/Users/mpaluch/git/lettuce/redis-server
config_file:

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