[ 
https://issues.apache.org/jira/browse/MAHOUT-409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12875362#action_12875362
 ] 

Jake Mannix commented on MAHOUT-409:
------------------------------------

So as the creator of the not-correctly-synchronizing bug, the original 
intention of it is actually improperly used in 
o.a.m.math.decomposer.AsyncEigenVerifier, which sync's on an EigenStatus: one 
thread is doing computation, and another thread is doing computation in a loop. 
 The latter thread after each iteration, checks the EigenStatus to see if it's 
still "inProgress()", which the first thread sets to false when it's done.  
Unfortunately, I don't think even that is being done correctly, if you look at 
how it's done, it's not synchronizing on a proper final lock object.  

So while yes, removing the lock on the boolean is correct, it reminds me that 
the way thread synchronization was coded (by me), it appears to have been done 
completely  unsafely.  As it turns out, the synchronization in practice is 
between two different threads who only make checks once every couple 10's of 
seconds up to once every 10's of minutes (depending on the data set), and so 
collisions on updating a single reference are basically infinitessimal.  
Doesn't make it any more correct, but fairly innocuous, at least.

> Find bugs finds some bugs in our code
> -------------------------------------
>
>                 Key: MAHOUT-409
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-409
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>         Attachments: MAHOUT-409.patch, MAHOUT-409.patch
>
>
> I will produce a patch shortly that fixes some low hanging fruit highlighted 
> by findbugs.
> Notably this:
> http://hudson.zones.apache.org/hudson/job/Mahout-Quality/48/findbugsResult/HIGH/type.-1824009442/source.8285/#44
> and
> http://hudson.zones.apache.org/hudson/job/Mahout-Quality/48/findbugsResult/HIGH/type.-694648638/
> and
> http://hudson.zones.apache.org/hudson/job/Mahout-Quality/48/findbugsResult/HIGH/type.-1787470473/
> and
> http://hudson.zones.apache.org/hudson/job/Mahout-Quality/48/findbugsResult/HIGH/type.921339475/

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to