Bugzilla – Bug 1220
ORB eagerly resolves hostnames in IORs
Last modified: 2002-06-27 09:27:54
You need to log in before you can comment on or make changes to this bug.
Resolving hostnames inside an IOR is a potentially expensive operation, in fact, it can take dozens or even hundreds of milliseconds to resolve a single hostname, and some IORs contain a handful of hostnames. To avoid this problem the IOR demarshaling code carefully avoids resolving hostnames, it uses lazy evaluation to obtain the IP address only when needed. The key function to perform this lazy evaluation is TAO_IIOP_Endpoint::object_addr(). This optimization is defeated in practice, every time an object reference is demarshaled the ORB checks if the object reference is collocated. Check the code in TAO_ORB_Core::create_object() to find out how this is done. The code to check for collocation depends on the RT-CORBA settings, the thread-lane resources and a number of other configuration strategies, but finally it boils down to TAO_IIOP_Acceptor::is_collocated(), where it reads: if(endp->object_addr () == this->addrs_[i]) i.e. the IIOP_Endpoint::object_addr() lazy-evaluation function is called every time an object is demarshaled. Apparently this code is trying to avoid comparing the hostname strings, and using the ipaddresses because the latter are "faster". The correct code should be: if(this->addrs_[i].port() == endp->port() && ACE_OS::strcmp(this->hosts_[i], endp->host()) == 0)
Created an attachment (id=120) [details] The patch corresponding to this bug fix.
Commit fixes contained in the attachment. Also documented some problems with the collocation approach for SSLIOP and SHMIOP, they probably deserve their own bug reports, but I do not understand those protocols in enough detail to make sensible decisions about them. More details about the fixes in the following ChangeLog entry: Wed Jun 12 13:24:11 2002 Carlos O'Ryan <coryan@atdesk.com>
Fixed some problems exposed by the last change, more details in the following ChangeLog entry: Mon Jun 17 12:43:07 2002 Carlos O'Ryan <coryan@atdesk.com>
Could you just mark this as fixed, if it is so? If not please accept this bug (atleast for tao-support)
AFAIK the bug is fixed, thanks for the remainder.