- 27 3月, 2015 3 次提交
-
-
由 antirez 提交于
-
由 antirez 提交于
No semantical changes since to make dict.c truly able to scale over the 32 bit table size limit, the hash function shoulds and other internals related to hash function output should be 64 bit ready.
-
由 antirez 提交于
rehashidx is always positive in the two code paths, since the only negative value it could have is -1 when there is no rehashing in progress, and the condition is explicitly checked.
-
- 24 3月, 2015 4 次提交
-
-
由 antirez 提交于
Bug as old as Redis and blocking operations. It's hard to trigger since only happens on instance role switch, but the results are quite bad since an inconsistency between master and slave is created. How to trigger the bug is a good description of the bug itself. 1. Client does "BLPOP mylist 0" in master. 2. Master is turned into slave, that replicates from New-Master. 3. Client does "LPUSH mylist foo" in New-Master. 4. New-Master propagates write to slave. 5. Slave receives the LPUSH, the blocked client get served. Now Master "mylist" key has "foo", Slave "mylist" key is empty. Highlights: * At step "2" above, the client remains attached, basically escaping any check performed during command dispatch: read only slave, in that case. * At step "5" the slave (that was the master), serves the blocked client consuming a list element, which is not consumed on the master side. This scenario is technically likely to happen during failovers, however since Redis Sentinel already disconnects clients using the CLIENT command when changing the role of the instance, the bug is avoided in Sentinel deployments. Closes #2473.
-
由 antirez 提交于
There was a bug in Redis Cluster caused by clients blocked in a blocking list pop operation, for keys no longer handled by the instance, or in a condition where the cluster became down after the client blocked. A typical situation is: 1) BLPOP <somekey> 0 2) <somekey> hash slot is resharded to another master. The client will block forever int this case. A symmentrical non-cluster-specific bug happens when an instance is turned from master to slave. In that case it is more serious since this will desynchronize data between slaves and masters. This other bug was discovered as a side effect of thinking about the bug explained and fixed in this commit, but will be fixed in a separated commit.
-
由 Salvatore Sanfilippo 提交于
create-cluster fix for stop and watch commands
-
由 superlogical 提交于
-
- 23 3月, 2015 5 次提交
- 21 3月, 2015 6 次提交
-
-
由 antirez 提交于
-
由 antirez 提交于
-
由 antirez 提交于
-
由 antirez 提交于
1. No need to set btype in processUnblockedClients(), since clients flagged REDIS_UNBLOCKED should have it already cleared. 2. When putting clients in the unblocked clients list, clientsArePaused() should flag them with REDIS_UNBLOCKED. Not strictly needed with the current code but is more coherent.
-
由 antirez 提交于
When the list of unblocked clients were processed, btype was set to blocking type none, but the client remained flagged with REDIS_BLOCKED. When timeout is reached (or when the client disconnects), unblocking it will trigger an assertion. There is no need to process pending requests from blocked clients, so now clientsArePaused() just avoid touching blocked clients. Close #2467.
-
由 antirez 提交于
-
- 20 3月, 2015 4 次提交
-
-
由 antirez 提交于
In no case we should try to attempt to failover if myself->slaveof is NULL.
-
由 antirez 提交于
This commit moves the process of generating a new config epoch without consensus out of the clusterCommand() implementation, in order to make it reusable for other reasons (current target is to have a CLUSTER FAILOVER option forcing the failover when no master majority is reachable). Moreover the commit moves other functions which are similarly related to config epochs in a new logical section of the cluster.c file, just for clarity.
-
由 antirez 提交于
Before we relied on the global cluster state to make sure all the hash slots are linked to some node, when getNodeByQuery() is called. So finding the hash slot unbound was checked with an assertion. However this is fragile. The cluster state is often updated in the clusterBeforeSleep() function, and not ASAP on state change, so it may happen to process clients with a cluster state that is 'ok' but yet certain hash slots set to NULL. With this commit the condition is also checked in getNodeByQuery() and reported with a identical error code of -CLUSTERDOWN but slightly different error message so that we have more debugging clue in the future. Root cause of issue #2288.
-
由 antirez 提交于
Related to issue #2288.
-
- 18 3月, 2015 1 次提交
-
-
由 antirez 提交于
There are rare conditions where node->slaveof may be NULL even if the node is a slave. To check by flag is much more robust.
-
- 14 3月, 2015 2 次提交
-
-
由 Salvatore Sanfilippo 提交于
Support CLIENT commands in Redis Sentinel
-
由 antirez 提交于
If count is 0 SADD is called without element arguments, which is currently invalid.
-
- 13 3月, 2015 3 次提交
- 12 3月, 2015 6 次提交
- 11 3月, 2015 3 次提交
-
-
由 antirez 提交于
-
由 Salvatore Sanfilippo 提交于
Add command CLUSTER MYID
-
由 Michel Martens 提交于
-
- 10 3月, 2015 2 次提交
-
-
由 antirez 提交于
-
由 antirez 提交于
Not perfect since The Solution IMHO is to have a DSL with a table of configuration functions with type, limits, and aux functions to handle the odd ones. However this hacky macro solution is already better and forces to put limits in the range of numerical fields. More field types to be refactored in the next commits hopefully.
-
- 08 3月, 2015 1 次提交
-
-
由 antirez 提交于
-