Repository navigation
Breaking changes:
GeventRingNodeis gone (#39).- Use
RingNodeinstead. In a process that runsgevent.monkey.patch_all(),RingNoderuns its loop in a greenlet.
- Use
RingNode.poll()is private (#41).- Use
RingNode.start()andRingNode.stop()instead.
- Use
RingNode.start()returns only when the node is in the ring and has its ranges (#41).- If Redis does not confirm the subscription to the ring channel in 10 seconds,
start()raisesredis.exceptions.TimeoutError. RingNode.start()raisesRuntimeErrorif the node already started (#41).RingNode.start()andRingNode.stop()raiseRuntimeErrorif anotherstart()orstop()call on the same node is in progress (#41).RingNode.get_ranges()returns a tuple instead of a list (#40).- The timing constants have new names (#41):
POLL_INTERVALis nowPOLL_INTERVAL_SECONDS.NODE_TIMEOUTis nowNODE_TIMEOUT_SECONDS.CLEANUP_INTERVALis nowCLEANUP_INTERVAL_SECONDS.
New features:
HashAlgorithm.ring_point(key)returns the point of a key on the ring. It does not need aRingNode(#49).- The thread of a node has the name
redis-hashring-<key>(#41).
Bug fixes:
contains(),get_ranges(), andget_node_count()give correct results while another thread updates the ring. Before, they could see empty or partial ranges. Thencontains()returnedFalsefor keys that the node owns (#40).- Two
update()calls at the same time no longer lose ranges or keep an older ring (#40). - After
remove(), the node owns no keys, even if Redis fails during the removal (#40). contains()gives correct results right afterstart()returns. Before, it returnedFalsefor all keys until the first pass of the polling loop (#41).- At startup, the node waits for Redis to confirm the subscription to the ring channel before it reads the ring. Thus, the node does not miss changes of the ring during startup (#41).
stop()no longer waits forever if the thread of the node fails during its first Redis calls (#41).- A node no longer leaks file descriptors when its thread fails (#41).