-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Versions Maven Plugin updates random Module subsets with 2.14.1 #858
Comments
Thanks for the bug report. I think it's rather |
Child modules were processed in a parallel stream which added elements to an unsynchonized LinkedHashMap. This may resulted an incomplete set of child modules.
Child modules were processed in a parallel stream which added elements to an unsynchonized LinkedHashMap. This may resulted an incomplete set of child modules.
… it mutates a non-thread safe collection
Child modules were processed in a parallel stream which added elements to an unsynchonized LinkedHashMap. This may resulted an incomplete set of child modules. Note that as the stream items are not processed heavily there is no or minor advantage of parallel processing.
@corebonts there's also https://github.com/mojohaus/versions/blob/master/versions-maven-plugin/src/main/java/org/codehaus/mojo/versions/SetMojo.java#L375 here, the non-thread safe collection is modified from within a parallel stream please add that to your branch if you want |
Modules were processed in a parallel stream which added elements to an unsynchonized LinkedHashMap / LinkedHashSet. This may resulted an incomplete set of child modules. Note that as the stream items are not processed heavily there is no or minor advantage of parallel processing.
Modules were processed in a parallel stream which added elements to an unsynchonized LinkedHashMap / LinkedHashSet. This may resulted an incomplete set of child modules. Note that as the stream items are not processed heavily there is no or minor advantage of parallel processing.
Environment
mvnw.cmd
or./mvnw
withversions:set -DnewVersion=1.2.3-SNAPSHOT -DgenerateBackupPoms=false
Observed Behavior
On multiple runs it is not deterministic which versions are updated:
One of the sub parent hierarchies that seems to be always involved (partially) when something is not updated contains a single level of ~140 children but still not always only that hierarchy or a specific number of the children is affected.
With 2.14.0 it seems to not be broken yet for the same amount of test runs.
As this seems somewhat like a typical race condition we suspect that the introduction of
parallelStream
in this line combined with a non-concurrent Map might be problematic: c74ced2#diff-f58ee99d4e29219ee1519ba59712674919933915a6485ab987093718d0b773dbR1359Expected Behavior
All modules are consistently updated.
The text was updated successfully, but these errors were encountered: