[jira] Created: (LIVETRIBE-77) Broken Failover Logic in Livetribe SLP

View: New views
1 Messages — Rating Filter:   Alert me  

[jira] Created: (LIVETRIBE-77) Broken Failover Logic in Livetribe SLP

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Broken Failover Logic in Livetribe SLP
--------------------------------------

                 Key: LIVETRIBE-77
                 URL: http://jira.codehaus.org/browse/LIVETRIBE-77
             Project: LiveTribe
          Issue Type: Bug
          Components: SLP
    Affects Versions: SLP 2.0.1
            Reporter: Simone Bordet


As reported by Nicholas White on the mailing list:

There is a bug in the SLP Server code that causes a problem...

TO REPRODUCE (using the standard directory server, and the client and
servers here: http://livetribe.codehaus.org/SLP-Examples-JMX

(1) Start the directory server, client and server. They should all
find each other
(2) Kill the directory server and the client
(3) Start the directory server, then the client
** the client will not find the server**

WHY

When the directory server restarts, it sends advertising messages.
However, the server doesn't respond as it thinks it has already
registered with that server. In the meantime, it advertises itself via
multicast. When the client is restarted, it finds the directory server
and interrogates it, so doesn't read the server's multicast messages.

CODE

In DirectoryAgentInfoCache, the following method is called when a
server receives a directory server advertisement:

  public void handle(DirectoryAgentInfo directoryAgent)
  {
      if (directoryAgent.isShuttingDown())
      {
          DirectoryAgentInfo removed = remove(directoryAgent.getKey());
          if (removed != null) notifyDirectoryAgentDied(directoryAgent);
      }
      else
      {
          DirectoryAgentInfo existing = add(directoryAgent);
          if (existing == null)
notifyDirectoryAgentBorn(directoryAgent); //*******REMOVE if(existing
== null)*******
      }
  }

In the above situation, existing is not null when the restarted
directory agent sends its advertisements, so the server never
responds. To fix this, remove 'if (existing == null)' so the server
always tells the directory agent what services it has.


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email