consistent hash picks a different server for the same key after upgrade of libmemcached
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmemcached |
Fix Released
|
Medium
|
Brian Aker |
Bug Description
I recently tried to upgrade from libmemcached 0.48 to 1.0.7 and it looks like there was an undocumented change to the way consistent hashing works because 1.0.7 is choosing a different server given the same list of 17 servers.
libmemcached-0.48:
connect(5, {sa_family=AF_INET, sin_port=
poll([{fd=5, events=POLLOUT}], 1, 100) = 1 ([{fd=5, revents=POLLOUT}])
getsockopt(5, SOL_SOCKET, SO_ERROR, [17179869184], [4]) = 0
sendto(5, "get S9NqygXmkamkok1
recvfrom(5, 0x7f0900f5e080, 8196, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=5, events=POLLIN}], 1, 50) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "VALUE S9NqygXmkamkok1
libmemcached-1.0.7 chooses a different server:
connect(5, {sa_family=AF_INET, sin_port=
poll([{fd=5, events=POLLOUT}], 1, 100) = 1 ([{fd=5, revents=POLLOUT}])
getsockopt(5, SOL_SOCKET, SO_ERROR, [17179869184], [4]) = 0
sendto(5, "get S9NqygXmkamkok1
recvfrom(5, 0x7fed79cd23e0, 8196, 64, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=5, events=POLLIN}], 1, 50) = 1 ([{fd=5, revents=POLLIN}])
recvfrom(5, "END\r\n", 8196, MSG_DONTWAIT, NULL, NULL) = 5
This is the configuration:
Changed in libmemcached: | |
assignee: | nobody → Brian Aker (brianaker) |
Changed in libmemcached: | |
status: | Incomplete → In Progress |
Changed in libmemcached: | |
status: | In Progress → Fix Released |
Hi,
There was a bug fix from the zero trunk to the 1.0 trunk that changed consistency (everything is still consistent, but fixing the bug altered the behavior). This was one of the reasons for the major release.
Do you have particular keys that are articulating this? I want to make sure that the above reason is why the difference exists before closing this (i.e. make sure there isn't some other bug).
Thanks,
-Brian