| /redis-3.2.3/tests/support/ |
| H A D | redis.tcl | 45 set id [incr ::redis::id] 46 set ::redis::fd($id) $fd 48 set ::redis::blocking($id) 1 49 set ::redis::deferred($id) $defer 50 set ::redis::reconnect($id) 0 51 ::redis::redis_reset_state $id 59 if {$errorcode && $::redis::reconnect($id) && $::redis::fd($id) eq {}} { 70 set fd $::redis::fd($id) 77 set fd $::redis::fd($id) 140 catch {unset ::redis::fd($id)} [all …]
|
| H A D | cluster.tcl | 38 set id [incr ::redis_cluster::id] 40 set ::redis_cluster::nodes($id) {} 41 set ::redis_cluster::slots($id) {} 112 id $nodeid \ 127 foreach n $::redis_cluster::nodes($id) { 132 set ::redis_cluster::nodes($id) $nodes 146 set ::redis_cluster::startup_nodes($id) [lsort -unique $::redis_cluster::startup_nodes($id)] 150 proc ::redis_cluster::__method__close {id} { argument 152 set nodes $::redis_cluster::nodes($id) 160 catch {unset ::redis_cluster::nodes($id)} [all …]
|
| /redis-3.2.3/tests/cluster/tests/includes/ |
| H A D | init-tests.tcl | 5 foreach_${type}_id id { 9 restart_instance $type $id 16 foreach_redis_id id { 22 catch {R $id ping} err 29 foreach_redis_id id { 36 R $id MULTI 37 R $id cluster reset hard 39 R $id EXEC 42 R $id config rewrite 51 foreach_redis_id id {lappend ids $id} [all …]
|
| /redis-3.2.3/tests/sentinel/tests/ |
| H A D | 00-base.tcl | 16 foreach_sentinel_id id { 33 foreach_redis_id id { 34 if {$id != $master_id && $id != 0} { 53 foreach_sentinel_id id { 68 foreach_sentinel_id id { 73 for {set id 0} {$id < $quorum} {incr id} { 86 for {set id 0} {$id < $quorum} {incr id} { 92 foreach_sentinel_id id { 97 foreach_sentinel_id id { 107 foreach_sentinel_id id { [all …]
|
| H A D | 02-slaves-reconf.tcl | 14 foreach_redis_id id { 15 if {$id == $master_id} continue 16 if {[instance_is_killed redis $id]} continue 18 ([RI $id master_port] == $master_port) && 19 ([RI $id master_link_status] eq {up}) 35 foreach_sentinel_id id { 54 foreach_redis_id id { 55 if {$id == $master_id} continue 56 set killed_slave_id $id 57 kill_instance redis $id [all …]
|
| H A D | 05-manual.tcl | 11 foreach_sentinel_id id { 13 [lindex [S $id SENTINEL GET-MASTER-ADDR-BY-NAME mymaster] 1] != $old_port 27 foreach_redis_id id { 28 if {$id != $master_id && $id != 0} { 30 [RI $id master_port] == [lindex $addr 1] 32 fail "Redis ID $id not configured to replicate with new master"
|
| H A D | 01-conf-update.tcl | 14 foreach_sentinel_id id { 15 if {$id != 1} { 17 [lindex [S $id SENTINEL GET-MASTER-ADDR-BY-NAME mymaster] 1] != $old_port 19 fail "Sentinel $id did not received failover info"
|
| H A D | 07-down-conditions.tcl | 23 for {set id 0} {$id < $quorum} {incr id} { 24 kill_instance sentinel $id
|
| H A D | 06-ckquorum.tcl | 7 foreach_sentinel_id id { 8 assert_match "*OK $num_sentinels usable*" [S $id SENTINEL CKQUORUM mymaster]
|
| /redis-3.2.3/tests/sentinel/tests/includes/ |
| H A D | init-tests.tcl | 5 foreach_${type}_id id { 7 puts -nonewline "$type/$id " 9 restart_instance $type $id 16 foreach_sentinel_id id { 17 catch {S $id SENTINEL REMOVE mymaster} 30 foreach_sentinel_id id { 31 S $id SENTINEL MONITOR mymaster \ 35 foreach_sentinel_id id { 44 foreach_sentinel_id id { 55 foreach_sentinel_id id { [all …]
|
| /redis-3.2.3/tests/ |
| H A D | instances.tcl | 206 append str "[RI $id master_host]:[RI $id master_port]" 365 upvar 1 $idvar id 366 for {set id 0} {$id < [llength $instances]} {incr id} { 406 foreach_redis_id id { 407 if {$id == 0} { 410 R $id flushall 411 } elseif {$id < $n} { 428 foreach_${type}_id id { 430 return $id 442 proc kill_instance {type id} { argument [all …]
|
| /redis-3.2.3/utils/lru/ |
| H A D | test-lru.rb | 39 id = 0 41 id += 1 42 r.set(id,"foo") 49 first_set_max_id = id 55 (1..first_set_max_id).each{|id| 56 r.get(id) 66 id += 1 67 r.set(id,"foo") 84 if r.exists(id) 93 (1..id).each{|id| [all …]
|
| /redis-3.2.3/tests/cluster/ |
| H A D | cluster.tcl | 8 proc get_cluster_nodes id { argument 16 id [lindex $args 0] \ 37 proc get_myself id { argument 38 set nodes [get_cluster_nodes $id] 67 foreach_redis_id id { 72 fail "Cluster node $id cluster_state:[CI $id cluster_state]" 80 foreach_redis_id id { 81 if {$id < $first} continue 83 set me [get_myself $id] 112 foreach_redis_id id { [all …]
|
| /redis-3.2.3/tests/cluster/tests/ |
| H A D | 04-resharding.tcl | 17 foreach_redis_id id { 18 R $id config set appendonly yes 21 R $id config set appendfsync no 24 foreach_redis_id id { 27 [RI $id aof_enabled] == 1 123 foreach_redis_id id { 124 kill_instance redis $id 125 restart_instance redis $id 141 foreach_redis_id id { 148 foreach_redis_id id { [all …]
|
| H A D | 07-replica-migration.tcl | 18 foreach_redis_id id { 19 if {$id < 5} { 23 fail "Master #$id does not have 2 slaves as expected" 37 foreach_redis_id id { 38 if {$id < 5} { 39 test "Master #$id should have at least one replica" { 41 [llength [lindex [R $id role] 2]] >= 1 43 fail "Master #$id has no replicas"
|
| H A D | 03-failover-loop.tcl | 27 set myid [dict get [get_myself $tokill] id] 28 foreach_redis_id id { 29 if {$id == $tokill} continue 30 if {[dict get [get_myself $id] slaveof] eq $myid} { 31 set slave $id 112 foreach_redis_id id { 113 assert {[CI $id cluster_current_epoch] >= [CI $id cluster_my_epoch]}
|
| H A D | 00-base.tcl | 14 foreach_redis_id id { 17 set nodeid [dict get [get_myself $id] id] 34 foreach_redis_id id { 36 foreach n [get_cluster_nodes $id] {
|
| H A D | 12-replica-migration-2.tcl | 20 foreach_redis_id id { 21 if {$id < 5} { 25 fail "Master #$id does not have 2 slaves as expected" 31 set master0_id [dict get [get_myself 0] id]
|
| /redis-3.2.3/deps/jemalloc/test/unit/ |
| H A D | qr.c | 12 char id; member 22 entries[i].id = 'a' + i; in init_entries() 82 assert_c_eq(t->id, entries[(i+j) % NENTRIES].id, in test_entries_ring() 97 assert_c_eq(t->id, entries[(i+1) % NENTRIES].id, in test_entries_ring() 102 assert_c_eq(t->id, entries[(NENTRIES+i-1) % NENTRIES].id, in test_entries_ring() 132 assert_c_eq(t->id, entries[i+j].id, in TEST_BEGIN() 138 assert_c_eq(t->id, entries[NENTRIES - 1 - j].id, in TEST_BEGIN() 168 assert_c_eq(t->id, entries[(i+j+1) % NENTRIES].id, in TEST_BEGIN() 175 assert_c_eq(t->id, entries[(NENTRIES+i-1) % NENTRIES].id, in TEST_BEGIN() 180 assert_c_eq(t->id, entries[(i+1) % NENTRIES].id, in TEST_BEGIN() [all …]
|
| H A D | ql.c | 11 char id; member 52 entries[i].id = 'a' + i; in init_entries() 63 assert_c_eq(ql_first(head)->id, entries[0].id, "Element id mismatch"); in test_entries_list() 64 assert_c_eq(ql_last(head, link)->id, entries[nentries-1].id, in test_entries_list() 69 assert_c_eq(t->id, entries[i].id, "Element id mismatch"); in test_entries_list() 75 assert_c_eq(t->id, entries[nentries-i-1].id, in test_entries_list() 82 assert_c_eq(t->id, entries[i+1].id, "Element id mismatch"); in test_entries_list() 90 assert_c_eq(t->id, entries[i-1].id, "Element id mismatch"); in test_entries_list()
|
| /redis-3.2.3/src/ |
| H A D | ae.c | 207 long long id = eventLoop->timeEventNextId++; in aeCreateTimeEvent() local 212 te->id = id; in aeCreateTimeEvent() 219 return id; in aeCreateTimeEvent() 222 int aeDeleteTimeEvent(aeEventLoop *eventLoop, long long id) in aeDeleteTimeEvent() argument 226 if (te->id == id) { in aeDeleteTimeEvent() 227 te->id = AE_DELETED_EVENT_ID; in aeDeleteTimeEvent() 290 long long id; in processTimeEvents() local 293 if (te->id == AE_DELETED_EVENT_ID) { in processTimeEvents() 311 if (te->id > maxId) { in processTimeEvents() 321 id = te->id; in processTimeEvents() [all …]
|
| H A D | t_list.c | 222 notifyKeyspaceEvent(NOTIFY_LIST,event,c->argv[1],c->db->id); in pushGenericCommand() 259 c->argv[1],c->db->id); in pushxGenericCommand() 271 notifyKeyspaceEvent(NOTIFY_LIST,event,c->argv[1],c->db->id); in pushxGenericCommand() 373 c->argv[1],c->db->id); in popGenericCommand() 471 notifyKeyspaceEvent(NOTIFY_LIST,"ltrim",c->argv[1],c->db->id); in ltrimCommand() 551 notifyKeyspaceEvent(NOTIFY_LIST,"lpush",dstkey,c->db->id); in rpoplpushHandlePush() 585 touchedkey,c->db->id); in rpoplpushCommand() 740 db->id,argv,2,PROPAGATE_AOF|PROPAGATE_REPL); in serveClientBlockedOnList() 757 db->id,argv,2, in serveClientBlockedOnList() 767 db->id,argv,3, in serveClientBlockedOnList() [all …]
|
| H A D | ae.h | 60 typedef int aeTimeProc(struct aeEventLoop *eventLoop, long long id, void *clientData); 74 long long id; /* time event identifier. */ member 114 int aeDeleteTimeEvent(aeEventLoop *eventLoop, long long id);
|
| H A D | t_set.c | 293 notifyKeyspaceEvent(NOTIFY_SET,"sadd",c->argv[1],c->db->id); in saddCommand() 321 c->db->id); in sremCommand() 355 notifyKeyspaceEvent(NOTIFY_SET,"srem",c->argv[1],c->db->id); in smoveCommand() 440 notifyKeyspaceEvent(NOTIFY_SET,"spop",c->argv[1],c->db->id); in spopWithCountCommand() 497 alsoPropagate(server.sremCommand,c->db->id,propargv,3, in spopWithCountCommand() 543 alsoPropagate(server.sremCommand,c->db->id,propargv,3, in spopWithCountCommand() 592 notifyKeyspaceEvent(NOTIFY_SET,"spop",c->argv[1],c->db->id); in spopCommand() 911 dstkey,c->db->id); in sinterGenericCommand() 917 dstkey,c->db->id); in sinterGenericCommand() 1084 dstkey,c->db->id); in sunionDiffGenericCommand() [all …]
|
| H A D | db.c | 289 int selectDb(client *c, int id) { in selectDb() argument 290 if (id < 0 || id >= server.dbnum) in selectDb() 292 c->db = &server.db[id]; in selectDb() 319 signalFlushedDb(c->db->id); in flushdbCommand() 352 "del",c->argv[j],c->db->id); in delCommand() 374 long id; in selectCommand() local 384 if (selectDb(c,id) == C_ERR) { in selectCommand() 766 c->argv[1],c->db->id); in renameGenericCommand() 768 c->argv[2],c->db->id); in renameGenericCommand() 794 srcid = c->db->id; in moveCommand() [all …]
|