maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Rosenvold <kristian.rosenv...@gmail.com>
Subject Re: Concurrency in m3 - a status report
Date Mon, 26 Apr 2010 08:59:41 GMT
Den 26.04.2010 10:13, skrev nicolas de loof:
>> The problem with these things is that thread safety is not necessarily a
>> constant, and in the next 9 months there will be issues. So for some
>> plugins @threadsafe might equally much express an intent as much as it
>> reflects reality. So that makes me a bit sceptical to @threadsafe too.
>>
>>
>>      
> +1, I can't see any way to ENSURE a plugin is threadsafe as it depends on
> project and  (maybe overriden) plugin dependencies. We can just tag a plugin
> to be expected to work fine in multithreaded context
>    

The issue is http://jira.codehaus.org/browse/MNG-4642, and as an 
alternative solution we could
simply make a list somewhere that blacklists/whitelists/greylists 
plugins, as long as there's a reasonable
way to update such a list. Maybe something enforcer-like;

org.codehaus.plexus:plexus-io:[,1.0), BAN:"Serious compromises of thread 
integrity"
org.apache.maven:plugins:maven-era-plugin:*:WARN:"Can only run once per 
reactor"
org.codehaus.modell:modello-maven-plugin:(,1.3]:BAN:"Does not work -period"

If there was some place we could put such a list and update it we could 
probably provide the best
possible information. How could we do this ?

>not be thread safe, mostly due ti the embedded tools. I got
>ConcurrentModification issues with aspectJ plugin, so I don't think any
>AJC-based plugin could work fine with // build.

I don't mean to be disrespectful of aspectj, but from what I've seen of 
the code wrt thread
safety I think the appropriate solution is to syncrhonize the execute 
method of all aspectj-related
mojos. This is basically the same as @NotThreadSafe



> I don't know the way the weave mode is expected to work, but it could maybe
> support such @NotThreadSafe plugins by locking concurrent execution of the
> same plugin, but still runing other ones/othe phases in // modules.
>
>
>    

Oh we can do all sorts of weird and wonderful magics ;) The trick is not 
to deadlock the build - I /think/ it
should be ok but it's not the first thing I would like to do.


I will update m3 to add more warnings and possibly also update the link 
to the wiki page when builds fail in
  parallel build mode. Ok to put a wiki link in release binaries ?


Kristian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message