You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Kristian Rosenvold <kr...@gmail.com> on 2009/11/14 20:32:34 UTC

MNG-3004 Additional concurrency issue

I added a patch to the MNG-3004 jira issue that fixes an additional
concurrency issue with Dan Fabulich's patch.

I am the author of a pending surefire concurrency patch (
http://jira.codehaus.org/browse/SUREFIRE-555), which was one
of several patches I made to be able to run spring tests in parallel with
junit and surefire.

In the process of creating SUREFIRE-555 I made the following observations
about concurrency:

The different CPU architectures have wildly different characteristics when
it comes to concurrency. On a
pentium 4, "ConcurrentModificationException" is the norm (no real
parallelity). On a Core 2 duo you start getting more real
parallel execution, although even that CPU has very limited concurrency. The
i7 processor is a totally different
beast, and is massively concurrent compared with the C2D. I'd say the i7 is
the *first* cpu where you *really*
have to watch your synchronized blocks (or go straight to jail). Above that
again on the (intel) concurrency ladder
are the dual-chip xenons.

Dan's original solution to MNG-3004 failed on i7 and dual core xenons. With
the patch I posted
it seems to run flawlessly on both i7 and dual xenon servers (I'm running it
full blast on CI on the dual xenon right now).
This is for a build without any significant external snapshot dependencies.
So when it comes to general
"readyness" the patches seem to be stable. I will not get into the
architectural discussions.

I'll gladly make a unit test for the StringSearchModelInterpolator class
(untested AFIK), but I'm just a regular guy on
 the street submitting a patch and I need some advice on how to actually
make a unit/integration test for that class
(with wired dependencies). I looked around to find some similars but I
couldn't really find any. Anyone have any
suggestions for similar test I can work from ?

Kristian Rosenvold

Re: MNG-3004 Additional concurrency issue

Posted by Brett Porter <br...@apache.org>.
On 15/11/2009, at 6:32 AM, Kristian Rosenvold wrote:

> I added a patch to the MNG-3004 jira issue that fixes an additional
> concurrency issue with Dan Fabulich's patch.

Nice :)

> The different CPU architectures have wildly different characteristics when
> it comes to concurrency. On a
> pentium 4, "ConcurrentModificationException" is the norm (no real
> parallelity). On a Core 2 duo you start getting more real
> parallel execution, although even that CPU has very limited concurrency. The
> i7 processor is a totally different
> beast, and is massively concurrent compared with the C2D. I'd say the i7 is
> the *first* cpu where you *really*
> have to watch your synchronized blocks (or go straight to jail). Above that
> again on the (intel) concurrency ladder
> are the dual-chip xenons.

Luckily I just bought an i7 based machine for... um... testing :)

> I'll gladly make a unit test for the StringSearchModelInterpolator class
> (untested AFIK), but I'm just a regular guy on
> the street submitting a patch and I need some advice on how to actually
> make a unit/integration test for that class
> (with wired dependencies). I looked around to find some similars but I
> couldn't really find any. Anyone have any
> suggestions for similar test I can work from ?

SVN is down so I can't check, but StringSearchModelInterpolatorTest.java seems to exist in 2.1.x branches. Perhaps this is a completely different class on trunk. If it is injected by Plexus, the normal practices is for the test case to inherit PlexusTestCase, then call lookup(role, hint) in the setUp method (the role & hint will be shown in the top of the class being tested).

Thanks!
- Brett


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