Rinda::RingServer can't announce locally
Rinda::RingServer#do_reply takes tuples of the form [:lookup_ring, DRbObject]. For remote processes looking for a ring server this works fine as the callback proc in the second slot of the tuple will be a DRbObject.
When a process is looking for a ring server that is local it will never be found. DRb automatically converts a DRbObject to a local reference to reduce overhead, so the second slot of the tuple will be a Proc instance.
A Proc instance does not match DRbObject.
Changing the template to [:lookup_ring, nil] allows the ring server to respond to a local lookup request. This also prevents memory growth in the tuple space as matching arbitrary objects can be removed.
- lib/rinda/ring.rb: Announce RingServer for the same process.
[ruby-trunk - Bug #9163]
- test/rinda/test_rinda.rb: Tests for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
#1 Updated by drbrain (Eric Hodel) over 4 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
#2 [ruby-core:58628] Updated by drbrain (Eric Hodel) over 4 years ago
Committed per http://twitter.com/m_seki/status/405573265139044352