Return-Path: Delivered-To: apmail-maven-archiva-dev-archive@locus.apache.org Received: (qmail 79844 invoked from network); 11 Jan 2008 07:35:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jan 2008 07:35:29 -0000 Received: (qmail 17966 invoked by uid 500); 11 Jan 2008 07:35:19 -0000 Delivered-To: apmail-maven-archiva-dev-archive@maven.apache.org Received: (qmail 17915 invoked by uid 500); 11 Jan 2008 07:35:18 -0000 Mailing-List: contact archiva-dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: archiva-dev@maven.apache.org Delivered-To: mailing list archiva-dev@maven.apache.org Received: (qmail 17906 invoked by uid 99); 11 Jan 2008 07:35:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jan 2008 23:35:18 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of oching@exist.com designates 209.85.146.176 as permitted sender) Received: from [209.85.146.176] (HELO wa-out-1112.google.com) (209.85.146.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2008 07:34:54 +0000 Received: by wa-out-1112.google.com with SMTP id v33so1653401wah.2 for ; Thu, 10 Jan 2008 23:35:00 -0800 (PST) Received: by 10.143.124.4 with SMTP id b4mr1467525wfn.230.1200036900338; Thu, 10 Jan 2008 23:35:00 -0800 (PST) Received: by 10.143.192.6 with HTTP; Thu, 10 Jan 2008 23:35:00 -0800 (PST) Message-ID: <1a57a2980801102335w9155400ke653a5a14090103f@mail.gmail.com> Date: Fri, 11 Jan 2008 15:35:00 +0800 From: "Maria Odea Ching" Sender: oching@exist.com To: archiva-dev@maven.apache.org Subject: Re: svn commit: r610758 - /maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java In-Reply-To: <20080110110038.C85DC1A983A@eris.apache.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_93_2472065.1200036900376" References: <20080110110038.C85DC1A983A@eris.apache.org> X-Google-Sender-Auth: 2e21e5fa55540cf9 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_93_2472065.1200036900376 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Nicolas, I'm getting test failures in archiva-proxy after this change, specifically in CacheFailuresTransferTest. Could you please update the test case to reflect these changes? :) Thanks, Deng On Jan 10, 2008 7:00 PM, wrote: > Author: nicolas > Date: Thu Jan 10 03:00:35 2008 > New Revision: 610758 > > URL: http://svn.apache.org/viewvc?rev=610758&view=rev > Log: > skip when URL is in failure cache > cache proxy failures (404) for better performances > > Modified: > > maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java > > Modified: > maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java > URL: > http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java?rev=610758&r1=610757&r2=610758&view=diff > > ============================================================================== > --- > maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java > (original) > +++ > maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java > Thu Jan 10 03:00:35 2008 > @@ -524,10 +524,15 @@ > getLogger().info( emsg ); > return null; > } > - > + > + if ( urlFailureCache.hasFailedBefore( url ) ) > + { > + throw new NotFoundException( "Url has failed > before and cache-failure is enabled on this connector" ); > + } > + > Wagon wagon = null; > try > - { > + { > RepositoryURL repoUrl = remoteRepository.getURL(); > String protocol = repoUrl.getProtocol(); > wagon = (Wagon) wagons.get( protocol ); > @@ -547,7 +552,10 @@ > } > catch ( NotFoundException e ) > { > - // Do not cache url here. > + // public repositories may be slow to access, and > many request will fail when > + // muliple repositories are "merged" by archiva > via proxies. > + // so caching "not found" is usefull here to > enhance archiva response-time > + urlFailureCache.cacheFailure( url ); > throw e; > } > catch ( NotModifiedException e ) > > > ------=_Part_93_2472065.1200036900376--