Bug #9163

Rinda::RingServer can't announce locally

Added by Eric Hodel almost 2 years ago. Updated almost 2 years ago.

[ruby-core:58626]
Status:Closed
Priority:Normal
Assignee:Masatoshi Seki
ruby -v:- Backport:1.9.3: REQUIRED, 2.0.0: REQUIRED

Description

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.

rinda.ring.rb.announce_local_ring_server.patch Magnifier (1.28 KB) Eric Hodel, 11/27/2013 02:37 PM

Associated revisions

Revision 43872
Added by Eric Hodel almost 2 years ago

  • lib/rinda/ring.rb: Announce RingServer for the same process. [ruby-trunk - Bug #9163]
    • test/rinda/test_rinda.rb: Tests for the above.

Revision 43872
Added by Eric Hodel almost 2 years ago

  • lib/rinda/ring.rb: Announce RingServer for the same process. [ruby-trunk - Bug #9163]
    • test/rinda/test_rinda.rb: Tests for the above.

History

#1 Updated by Eric Hodel almost 2 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r43872.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/rinda/ring.rb: Announce RingServer for the same process. [ruby-trunk - Bug #9163]
    • test/rinda/test_rinda.rb: Tests for the above.

Also available in: Atom PDF