[GitHub] maven pull request #125: [MNG-5965] Parallel build multiplies work if multip...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] maven pull request #125: [MNG-5965] Parallel build multiplies work if multip...

lamyaa
GitHub user dbmeneses opened a pull request:

    https://github.com/apache/maven/pull/125

    [MNG-5965] Parallel build multiplies work if multiple goals are given

    This p/r should also fix MNG-5705.
   
    When multiple tasks are given so that they are grouped in different task segments, the MultiThreadedBuilder fails.
    The reason is that it creates project segments, which is a set of unique pairs of (module, task).
    It then handles each task separately, and it will schedules the build of the task for **all** root module in those pairs, instead of scheduling only the root module which are associated with that particular task.
   
    Example, given the project with the following hierarchy of modules:
    ```
    root
    -- module1
    ```
   
    If we run `mvn task1 task2`, being task2 an aggregating task, we get the following project segments:
       (task1, root), (task1, module1), (task2, root).
   
    The MultiThreadedBuilder will first handle task1, and will schedule the build of: (task1, root), (task1, root).
    Each of these builds will then recursively build it's children, meaning that _task1 will be executed twice for every module in the project_.
   
    This fix changes the builder so that it considers the project segments of each task segment separately, by creating a ConcurrencyDependencyGraph for each task segment.
   
    I believe that MNG-5705 is a consequence of the same problem, because the builder will not count correctly the number of projects that are built because of the shared ConcurrencyDependencyGraph, resulting in a NPE.
   
   


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

    $ git pull https://github.com/dbmeneses/maven master

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

    https://github.com/apache/maven/pull/125.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 #125
   
----
commit 9518bb247bb5c9dbc267cdaa3407618178aad1f4
Author: Duarte Meneses <[hidden email]>
Date:   2017-07-04T15:33:10Z

    [MNG-5965] Parallel build multiplies work if multiple goals are given

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] maven issue #125: [MNG-5965] Parallel build multiplies work if multiple goal...

lamyaa
Github user ifedorenko commented on the issue:

    https://github.com/apache/maven/pull/125
 
    Can you provide a regression test that demonstrates the problem and the fix?
   
    Semi-related, I recently fixed similar problem in [Takari Smart Builder](https://github.com/takari/takari-smart-builder) where aggregate tasks ran multiple times. Multithreading is hard :-)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] maven issue #125: [MNG-5965] Parallel build multiplies work if multiple goal...

lamyaa
In reply to this post by lamyaa
Github user ifedorenko commented on the issue:

    https://github.com/apache/maven/pull/125
 
    No, having IT failures are not normal, and [jenkins seems to be happy](https://builds.apache.org/view/M-R/view/Maven%20Core%20ITs/job/core-integration-testing-maven-3-embedded/).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...