chnaghong1990 / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Problems inserting subsequent calls to HMSET #604

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Redis Version 2.2.11 on Ubuntu 10.04

Sometimes subsequent calls to HMSET command insert invalid values in the Hash

FLUSHALL 

HMSET key "field" "value" "field2" "value2" "field3" "value3" "field4" "value4" 

remove a field in a command.

HMSET key2 "field" "value" "field3" "value3" "field4" "value4" 

reinsert a field

HMSET key3 "field" "value" "field2" "value2" "field3" "value3" "field4" 
"value4" 

now i have 3 keys

sometimes, but often after a remove of key1 key2 and key3 

if i execute HKEYS or HVALS in key2 i found a field named "field2" with value 
of corrisponding field in key3. 

What steps will reproduce the problem?

Do you have an INFO output? Please past it here.

redis_version:2.2.11
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:epoll
process_id:1584
uptime_in_seconds:70360
uptime_in_days:0
lru_clock:1040452
used_cpu_sys:1.97
used_cpu_user:2.84
used_cpu_sys_childrens:0.19
used_cpu_user_childrens:0.03
connected_clients:4
connected_slaves:0
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
used_memory:844104
used_memory_human:824.32K
used_memory_rss:2506752
mem_fragmentation_ratio:2.97
use_tcmalloc:0
loading:0
aof_enabled:0
changes_since_last_save:6
bgsave_in_progress:0
last_save_time:1310638470
bgrewriteaof_in_progress:0
total_connections_received:6120
total_commands_processed:33387
expired_keys:1813
evicted_keys:0
keyspace_hits:15792
keyspace_misses:2851
hash_max_zipmap_entries:512
hash_max_zipmap_value:64
pubsub_channels:0
pubsub_patterns:0
vm_enabled:0
role:master
allocation_stats:2=1682,6=1,8=147,9=6229,10=4821,11=4052,12=7421,13=15986,14=152
65,15=17468,16=206487,17=10192,18=15278,19=122,20=6327,21=6719,22=2006,23=3622,2
4=27729,25=106,26=831,27=1453,28=3123,29=38,30=1,31=20,32=1644,33=48,34=12,36=14
,37=37,40=6160,41=3,43=259,45=9051,46=14,47=33,48=24486,49=2809,50=48,51=8,53=13
51,54=1,55=1,56=13,57=16603,58=1929,59=28,60=594,61=114,62=558,63=2,64=1023,65=2
770,66=4601,67=2102,68=2143,69=27,70=1,71=8,72=12,73=2,76=980,77=8,78=50,80=13,8
1=43,82=29,83=158,84=7,85=2,87=8,88=9980,90=11,91=15,94=13,95=231,96=11,97=9,98=
12,99=1,101=1,102=82,103=4,104=4,106=18,107=49,109=91,111=1,112=44,115=52,116=95
,117=12,118=37,119=1,120=1737,121=106,122=1,123=1003,125=1,126=2,128=153,130=9,1
32=9,133=5,134=6,135=270,136=1,137=59,138=39,139=19,140=32,142=13,143=625,144=55
9,145=1,146=65,147=1050,148=10,149=46,150=9,151=3447,152=6,153=18,154=46,155=324
,156=64,157=189,158=157,159=114,160=1187,161=66,162=50,163=189,164=78,165=193,16
6=6,167=35,168=15,169=101,170=17,171=54,172=11,173=20,174=37,175=12,176=197,177=
8,178=32,179=51,180=51,181=11,182=68,184=17,185=7,186=16,187=7,188=5,189=28,190=
4,191=20,192=142,193=19,194=10,195=16,196=37,197=51,198=22,199=36,200=1,201=16,2
02=23,203=60,204=65,205=9,206=42,208=3,209=68,210=36,211=64,212=110,213=168,214=
93,215=10,216=39,217=38,218=17,219=76,220=67,221=42,222=30,224=60,225=56,226=37,
227=53,228=15,229=29,230=44,231=1,232=1,233=36,234=6,235=3,236=15,237=32,238=38,
239=54,240=3,241=52,242=1,243=10,246=36,247=14,248=2,249=44,250=1,251=48,252=66,
253=22,254=36,>=256=10169
db0:keys=16,expires=11

Original issue reported on code.google.com by ppossanz...@gmail.com on 14 Jul 2011 at 10:20

GoogleCodeExporter commented 8 years ago
All databases are emptied when you call FLUSHALL. This means no keys exists. I 
can't see how "key2" can have a field "field2" when you don't execute a command 
to put it there. Can you provide an exact sequence of commands that result in 
this behavior?

Original comment by pcnoordh...@gmail.com on 14 Jul 2011 at 10:30

GoogleCodeExporter commented 8 years ago
i'm investigating to understand if it's my fault and if i write the key twice. 
one time with value and one time without it. 

Original comment by ppossanz...@gmail.com on 14 Jul 2011 at 11:10

GoogleCodeExporter commented 8 years ago
Can you post back if this problem was in fact caused by Redis? Closing the 
issue in the meantime.

Original comment by pcnoordh...@gmail.com on 27 Jul 2011 at 11:40