[ 
https://issues.apache.org/jira/browse/IVY-1572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16312693#comment-16312693
 ] 

ASF GitHub Bot commented on IVY-1572:
-------------------------------------

GitHub user apupier opened a pull request:

    https://github.com/apache/ant-ivy/pull/62

    IVY-1572 - Check for Thread interruption while resolving resources

    Signed-off-by: Aurélien Pupier <apup...@redhat.com>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apupier/ant-ivy 
IVY-1572-CheckForInterruptionDuringLongRunningOperations

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ant-ivy/pull/62.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #62
    
----
commit ed2666f48b7783d95b75f59314baf08994fb0948
Author: Aurélien Pupier <apupier@...>
Date:   2018-01-05T08:22:15Z

    IVY-1572 - Check for Thread interruption while resolving resources
    
    Signed-off-by: Aurélien Pupier <apup...@redhat.com>

----


> Look for Thread interruption on potentially long-running operation 
> org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findResourceUsingPatterns(ModuleRevisionId,
>  List, Artifact, ResourceMDParser, Date)
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-1572
>                 URL: https://issues.apache.org/jira/browse/IVY-1572
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.4.0
>            Reporter: Aurelien Pupier
>
> While searching for an unavailable artifact and a lot of repositories are 
> defined (and especially when some of them are not very responsive), the 
> search can take several minutes.
> For this reason, it would be nice to be able to look for interruption during 
> a search.
> example of stack
> {noformat}
> Thread [Camel Version Checker - 
> org.fusesource.ide.projecttemplates.util.CamelVersionChecker@576f3c03] 
> (Suspended)    
>       owns: BufferedInputStream  (id=195)     
>       owns: CamelVersionChecker  (id=196)     
>       SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) 
> line: not available [native method]        
>       SocketInputStream.socketRead(FileDescriptor, byte[], int, int, int) 
> line: 116   
>       SocketInputStream.read(byte[], int, int, int) line: 170 
>       SocketInputStream.read(byte[], int, int) line: 141      
>       BufferedInputStream.fill() line: 246    
>       BufferedInputStream.read() line: 265    
>       HttpParser.readRawLine(InputStream) line: 78    
>       HttpParser.readLine(InputStream, String) line: 106      
>       
> MultiThreadedHttpConnectionManager$HttpConnectionWithReference(HttpConnection).readLine(String)
>  line: 1116      
>       
> MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(String) 
> line: 1413    
>       HeadMethod(HttpMethodBase).readStatusLine(HttpState, HttpConnection) 
> line: 1973 
>       HeadMethod(HttpMethodBase).readResponse(HttpState, HttpConnection) 
> line: 1735   
>       HeadMethod(HttpMethodBase).execute(HttpState, HttpConnection) line: 
> 1098        
>       HttpMethodDirector.executeWithRetry(HttpMethod) line: 398       
>       HttpMethodDirector.executeMethod(HttpMethod) line: 171  
>       HttpClient.executeMethod(HostConfiguration, HttpMethod, HttpState) 
> line: 397    
>       HttpClient.executeMethod(HttpMethod) line: 323  
>       TimeoutHttpClientHandler(HttpClientHandler).doHead(URL, int) line: 266  
>       TimeoutHttpClientHandler(HttpClientHandler).getURLInfo(URL, int) line: 
> 152      
>       TimeoutHttpClientHandler.getURLInfo(URL) line: 55       
>       URLResource.init() line: 68     
>       URLResource.exists() line: 84   
>       
> IBiblioResolver(RepositoryResolver).findResourceUsingPattern(ModuleRevisionId,
>  String, Artifact, ResourceMDParser, Date) line: 97       
>       
> IBiblioResolver(AbstractPatternsBasedResolver).findResourceUsingPatterns(ModuleRevisionId,
>  List, Artifact, ResourceMDParser, Date) line: 100    
>       IBiblioResolver.findIvyFileRef(DependencyDescriptor, ResolveData) line: 
> 103     
>       IBiblioResolver(BasicResolver).getDependency(DependencyDescriptor, 
> ResolveData) line: 230       
>       IBiblioResolver.getDependency(DependencyDescriptor, ResolveData) line: 
> 506      
>       ChainResolver.getDependency(DependencyDescriptor, ResolveData) line: 
> 104        
>       IvyNode.loadData(String, IvyNode, String, String, boolean, 
> IvyNodeUsage) line: 170      
>       VisitNode.loadData(String, boolean) line: 292   
>       ResolveEngine.fetchDependencies(VisitNode, String, boolean) line: 718   
>       ResolveEngine.doFetchDependencies(VisitNode, String) line: 803  
>       ResolveEngine.fetchDependencies(VisitNode, String, boolean) line: 726   
>       ResolveEngine.getDependencies(ModuleDescriptor, ResolveOptions, 
> ResolveReport) line: 599        
>       ResolveEngine.resolve(ModuleDescriptor, ResolveOptions) line: 236       
>       Ivy.resolve(ModuleDescriptor, ResolveOptions) line: 523 
>       Ivy$resolve$0.call(Object, Object, Object) line: not available  
>       GrapeIvy.getDependencies(Map, IvyGrabRecord...) line: 410       
>       NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not 
> available [native method]  
>       NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62      
>       DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43  
>       Method.invoke(Object, Object...) line: 498      
>       PogoMetaMethodSite$PogoCachedMethodSite.invoke(Object, Object[]) line: 
> 169      
>       
> PogoMetaMethodSite$PogoCachedMethodSite(PogoMetaMethodSite).callCurrent(GroovyObject,
>  Object[]) line: 59        
>       GrapeIvy.resolve(ClassLoader, Map, List, Map...) line: 571      
>       GrapeIvy$resolve$1.callCurrent(GroovyObject, Object, Object, Object, 
> Object) line: not available        
>       GrapeIvy.resolve(ClassLoader, Map, Map...) line: 538    
>       GrapeIvy$resolve$0.callCurrent(GroovyObject, Object, Object, Object) 
> line: not available        
>       GrapeIvy.grab(Map, Map...) line: 256    
>       NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not 
> available [native method]  
>       NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62      
>       DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43  
>       Method.invoke(Object, Object...) line: 498      
>       PogoMetaMethodSite$PogoCachedMethodSite.invoke(Object, Object[]) line: 
> 169      
>       
> PogoMetaMethodSite$PogoCachedMethodSite(PogoMetaMethodSite).callCurrent(GroovyObject,
>  Object[]) line: 59        
>       
> PogoMetaMethodSite$PogoCachedMethodSite(AbstractCallSite).callCurrent(GroovyObject,
>  Object, Object) line: 174   
>       GrapeIvy.grab(Map) line: 237    
>       Grape.grab(Map<String,Object>) line: 152        
>       MavenVersionManager.loadVersion(String) line: 109       
>       CamelService.isCamelVersionExisting(String) line: 326   
>       CamelManagerServiceProxy.isCamelVersionExisting(String) line: 171       
>       CamelVersionChecker.isCamelVersionValid(String) line: 79        
>       CamelVersionChecker.lambda$0() line: 60 
>       1017131809.run() line: not available    
>       Thread.run() line: 745  
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to