Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 72732 invoked from network); 24 Apr 2008 09:00:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2008 09:00:19 -0000 Received: (qmail 44456 invoked by uid 500); 24 Apr 2008 09:00:20 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 43910 invoked by uid 500); 24 Apr 2008 09:00:19 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 43899 invoked by uid 99); 24 Apr 2008 09:00:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2008 02:00:19 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of t.p.ellison@gmail.com designates 64.233.182.191 as permitted sender) Received: from [64.233.182.191] (HELO nf-out-0910.google.com) (64.233.182.191) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2008 08:59:34 +0000 Received: by nf-out-0910.google.com with SMTP id k4so1620722nfd.40 for ; Thu, 24 Apr 2008 01:59:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; bh=oZDGKhKgc6UDi1yXeXLWhHNOpbe869H2TjHqyiFhHYU=; b=tSVp9HA8lPZmAGTJkJwKwaBv5RA2YHziIrbygXGd6UkNSmSoiVyTM4cgIKmEomxb016XwyXZlAusmXxywnvimBvP+zvnPw/J9Z4rR90A6Ql3Z7QQ5RHZMNZ4h+w2ZIKUE6NMygSdeowF47+uIVCyBTOTZ71ry9vv5380l6mDZDo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=b3BWJGKWxfqsol+cR0Bx5GnkHhSxlyF0KAbTqf6G0Noybquf8ELyTaJtAhHRyGmHROVcJnnxY5iLDNr8a09ak1ag8aycgIA4pAMOAyY3A/0iegMoft0PLEn53tE8rAoGRQplQ1yO2QlBD8FLevebIkInztuYrju1RQuxX8yxUI8= Received: by 10.210.80.2 with SMTP id d2mr486568ebb.7.1209027586846; Thu, 24 Apr 2008 01:59:46 -0700 (PDT) Received: from ?9.20.183.76? ( [195.212.29.75]) by mx.google.com with ESMTPS id z37sm169781ikz.1.2008.04.24.01.59.45 (version=SSLv3 cipher=RC4-MD5); Thu, 24 Apr 2008 01:59:45 -0700 (PDT) Message-ID: <48104BFF.5010407@gmail.com> Date: Thu, 24 Apr 2008 09:59:43 +0100 From: Tim Ellison User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: dev@harmony.apache.org Subject: Re: [classlib][luni] put only host name in UnknownHostException References: <3b3f27c60804232023w4402e18djfb43e0c72b7a9e63@mail.gmail.com> In-Reply-To: <3b3f27c60804232023w4402e18djfb43e0c72b7a9e63@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Nathan Beyer wrote: > https://issues.apache.org/jira/browse/HARMONY-5784 > > Anyone have any issue with making this change? Currently, the behavior is > such that the host is in the message, but with the additional "No such file > or directory" message. There doesn't seem to be much value in the additional > message, so changing this to just be the host that was passed in is pretty > trivial. Yeah, can dump the bogus information from the message. > However, when unwinding this a bit, there's this NegativeCache class that > stores failed lookups and the message failure. Is this really needed? Is it > appropriate? There's already a cache of resolved InetAddress object that > were found, but this cache has a expiry, as I would have expected, but the > NegativeCache doesn't. Any thoughts or comments on eliminating this negative > cache bit? It seems like the negative cache isn't being maintained properly > (no expiry, etc), so if a host became accessible over time, it wouldn't be > accessible. Additionally, I don't think the overhead of the memory, though > minimal, is really worth not executing a lookup, which would already be > offset by resolvable hosts in the other cache. The negative cache is needed, and it is described by the spec for InetAddress [1] (see "InetAddress Caching"). It should have an expiry mechanism which admins can tweak using the networkaddress.cache.negative.ttl property. [1] http://java.sun.com/j2se/1.5.0/docs/api/java/net/InetAddress.html Regards, Tim