You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Gabe Resneck (JIRA)" <ji...@apache.org> on 2011/09/09 03:30:08 UTC

[jira] [Commented] (OODT-314) It is possible for 2 jobs submitted at very similar times to be assigned the same ID by the MemoryJobRepository

    [ 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

        

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

Posted by "Mattmann, Chris A (388J)" <ch...@jpl.nasa.gov>.
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)" <ji...@apache.org> 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
> 
>