Gabe,

Isn't the method that assigns IDs synchronized?

How about a unit test that demonstrates this?

Cheers,
Chris

Sent from my iPhone

On Sep 8, 2011, at 7:30 PM, "Gabe Resneck (JIRA)" <[email protected]> wrote:

> 
>    [ 
> https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100842#comment-13100842
>  ] 
> 
> Gabe Resneck commented on OODT-314:
> -----------------------------------
> 
> I propose to fix this bug by creating a getUniqueId() method that will be 
> called when a job is added to the repo.  This would provide an ID based upon 
> the time but also append a numeral to the back of the time code and check if 
> the ID matches any already in the repo.
> 
> A patch will be forthcoming.
> 
>> 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
> 
> 

Reply via email to