oodt-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mattmann, Chris A (388J)" <chris.a.mattm...@jpl.nasa.gov>
Subject Re: [jira] [Commented] (OODT-314) It is possible for 2 jobs submitted at very similar times to be assigned the same ID by the MemoryJobRepository
Date Fri, 09 Sep 2011 04:03:33 GMT
Hey Gabe yeah just need to synchronize the method I think...

Sent from my iPhone

On Sep 8, 2011, at 6:48 PM, "Gabe Resneck (JIRA)" <jira@apache.org> wrote:

> 
>    [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100850#comment-13100850
] 
> 
> Gabe Resneck commented on OODT-314:
> -----------------------------------
> 
> While the addJob() method is synchronized in the XStreamJobRepository class, it is not
in the MemoryJobRepository class.  While this could lead to the causing bug, I actually ran
into it during some unit testing for some JobQueue classes.  I was submitting one job after
another and kept seeing non-deterministic results from the tests.  After searching for the
cause of this I found that consecutively submitted jobs sometimes had the same ID because
they were added to the repo during the same millisecond.
> 
> I will provide unit tests to check against this bug (and for the rest of the class, since
it currently lacks unit tests) when I submit the patch to fix it.
> 
>> It is possible for 2 jobs submitted at very similar times to be assigned the same
ID by the MemoryJobRepository
>> ---------------------------------------------------------------------------------------------------------------
>> 
>>                Key: OODT-314
>>                URL: https://issues.apache.org/jira/browse/OODT-314
>>            Project: OODT
>>         Issue Type: Bug
>>         Components: resource manager
>>           Reporter: Gabe Resneck
>>           Assignee: Gabe Resneck
>> 
>> Currently, when a job is added to a MemoryJobRepository, it helps to ensure no duplicates
by assigning a new ID to that job based upon the current time.  However, it is still possible
for jobs to be assigned the same ID if they are submitted at very similar times.
> 
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
> 
> 

Mime
View raw message