archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maria Odea Ching" <och...@apache.org>
Subject Re: svn commit: r610758 - /maven/archiva/trunk/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java
Date Fri, 11 Jan 2008 07:35:00 GMT
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, <nicolas@apache.org> 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 )
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message