You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/12/28 19:47:52 UTC

[GitHub] [maven-resolver] ibabiankou commented on pull request #142: [MRESOLVER-7] Download dependency POMs in parallel

ibabiankou commented on pull request #142:
URL: https://github.com/apache/maven-resolver/pull/142#issuecomment-1002256947


   @michael-o I'm absolutely certain of that too. I'm not sure however what is the best way to solve it, especially because I don't have a reliable way to reproduce it :disappointed: 
   
   Looking at the implementation of the `BasicRepositoryConnector$GetTaskRunner` each artifact download should create a [PartialFile](https://github.com/apache/maven-resolver/blob/master/maven-resolver-connector-basic/src/main/java/org/eclipse/aether/connector/basic/BasicRepositoryConnector.java#L442)  which also creates a corresponding [LockFile](https://github.com/apache/maven-resolver/blob/master/maven-resolver-connector-basic/src/main/java/org/eclipse/aether/connector/basic/PartialFile.java#L268) which actually [blocks until it gets an exclusive lock](https://github.com/apache/maven-resolver/blob/master/maven-resolver-connector-basic/src/main/java/org/eclipse/aether/connector/basic/PartialFile.java#L114) :detective: It makes me wonder whether there is an issue with that logic :thinking: 
   
   To fix it I can think of modifying [getArtifactDescriptorResult](https://github.com/ibabiankou/maven-resolver/blob/MRESOLVER-7/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L600) to ensure it allows single call for the same artifact at a time ([something like this](https://github.com/ibabiankou/maven-resolver/commit/4a906a1ed8c0e0358275981aa243fdfe5dab1d01)). But that feels a bit wrong place to solve this.
   
   Ideally I would put that kind of logic in the `DefaultArtifactResolver`, but that would be too big of a change to make in the scope of this PR :sweat_smile: 
   
   What do you think @michael-o? Does [this approach](https://github.com/ibabiankou/maven-resolver/commit/4a906a1ed8c0e0358275981aa243fdfe5dab1d01) make sense to you?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org