- 30 9月, 2013 8 次提交
-
-
由 antirez 提交于
The new algorithm does not check replies time as checking for the currentEpoch in the reply ensures that the reply is about the current election process.
-
由 antirez 提交于
-
由 antirez 提交于
-
由 antirez 提交于
-
由 antirez 提交于
The old algorithm used a PROMOTED flag and explicitly checks about slave->master convertions. Wit the new cluster meta-data propagation algorithm we just look at the configEpoch to check if we need to reconfigure slots, then: 1) If a node is a master but it reaches zero served slots becuase of reconfiguration. 2) If a node is a slave but the master reaches zero served slots because of a reconfiguration. We switch as a replica of the new slots owner.
-
由 antirez 提交于
We need to: 1) Increment the configEpoch. 2) Save it to disk and fsync the file. 3) Broadcast the PONG with the new configuration. If other nodes will receive the updated configuration we need to be sure to restart with this new config in the event of a crash.
-
由 antirez 提交于
-
由 antirez 提交于
-
- 27 9月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 26 9月, 2013 4 次提交
- 25 9月, 2013 7 次提交
- 20 9月, 2013 2 次提交
-
-
由 antirez 提交于
First change: now there is no need to be a master in order to detect a failure, however the majority of masters signaling PFAIL or FAIL is needed. This change is important because it allows slaves rejoining the cluster after a partition to sense the FAIL condition so that eventually all the nodes agree on failures.
-
由 antirez 提交于
The time is sent in requests, and copied back in reply packets. This way the receiver can compare the time field in a reply with its local clock and check the age of the request associated with this reply. This is an easy way to discard delayed replies. Note that only a clock is used here, that is the one of the node sending the packet. The receiver only copies the field back into the reply, so no synchronization is needed between clocks of different hosts.
-
- 17 9月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 04 9月, 2013 6 次提交
-
-
由 antirez 提交于
-
由 antirez 提交于
Handshake nodes should turn into normal nodes or be freed in a reasonable amount of time, otherwise they'll keep accumulating if the address they are associated with is not reachable for some reason.
-
由 antirez 提交于
The code freed a reply object that was never created, resulting in a segfault every time randomkey returned a key that was deleted before we queried it for size.
-
由 antirez 提交于
-
由 antirez 提交于
-
由 antirez 提交于
-
- 03 9月, 2013 5 次提交
-
-
由 Maxim Zakharov 提交于
-
由 Maxim Zakharov 提交于
-
由 antirez 提交于
-
由 antirez 提交于
-
由 antirez 提交于
The code used to copy the header *after* the 'hdr' pointer was already switched to the new buffer. Of course we need to do the reverse.
-
- 30 8月, 2013 1 次提交
-
-
由 antirez 提交于
-
- 29 8月, 2013 2 次提交
-
-
由 antirez 提交于
-
由 antirez 提交于
Multiple missing calls to lua_pop prevented the error handler function pushed on the stack for lua_pcall() to be popped before returning, causing a memory leak in almost all the code paths of EVAL (both successful calls and calls returning errors). This caused two issues: Lua leaking memory (and this was very visible from INFO memory output, as the 'used_memory_lua' field reported an always increasing amount of memory used), and as a result slower and slower GC cycles resulting in all the CPU being used. Thanks to Tanguy Le Barzic for noticing something was wrong with his 2.8 slave, and for creating a testing EC2 environment where I was able to investigate the issue.
-
- 27 8月, 2013 3 次提交