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

Ted Dunning commented on MAHOUT-409:
------------------------------------

{quote}
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.
{quote}

I left the field as volatile in the latest patch which will give the desired 
semantics (for the flag, not the use of same).  

> 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