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:28:09 UTC

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

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

        

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

Posted by "Chris A. Mattmann (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris A. Mattmann updated OODT-314:
-----------------------------------


- push out to 0.5
                
> 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
>             Fix For: 0.5
>
>         Attachments: TestFifoMappedJobQueue.java
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[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) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103122#comment-13103122 ] 

Mattmann, Chris A (388J) commented on OODT-314:
-----------------------------------------------

Err Gabe sorry iPhone auto correct 

Sent from my iPhone




> 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
>             Fix For: 0.4
>
>         Attachments: TestFifoMappedJobQueue.java
>
>
> 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

        

[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) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100844#comment-13100844 ] 

Mattmann, Chris A (388J) commented on OODT-314:
-----------------------------------------------

Gabe,

Isn't the method that assigns IDs synchronized?

How about a unit test that demonstrates this?

Cheers,
Chris

Sent from my iPhone




> 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] [Updated] (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>.
Err Gabe sorry iPhone auto correct 

Sent from my iPhone

On Sep 12, 2011, at 6:10 PM, "Gabe Resneck (JIRA)" <ji...@apache.org> wrote:

> 
>     [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> Gabe Resneck updated OODT-314:
> ------------------------------
> 
>    Attachment: TestFifoMappedJobQueue.java
> 
> I ran into the bug while running the testPromoteJob() test method.  You will see that two jobs are added to the queue (and, as a result, also the job repo) back to back.  I don't think that this is a threading issue because this is done inside the same test, which would all be done on one thread.  I probably just should have posted this to begin with.  My bad. 
> 
>> 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
>>            Fix For: 0.4
>> 
>>        Attachments: TestFifoMappedJobQueue.java
>> 
>> 
>> 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] [Updated] (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>.
Thanks gave I'll check it out.

I'm not sure how in a non threaded app new Date() would ever generate the same time but I'll check...

Sent from my iPhone

On Sep 12, 2011, at 6:10 PM, "Gabe Resneck (JIRA)" <ji...@apache.org> wrote:

> 
>     [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> Gabe Resneck updated OODT-314:
> ------------------------------
> 
>    Attachment: TestFifoMappedJobQueue.java
> 
> I ran into the bug while running the testPromoteJob() test method.  You will see that two jobs are added to the queue (and, as a result, also the job repo) back to back.  I don't think that this is a threading issue because this is done inside the same test, which would all be done on one thread.  I probably just should have posted this to begin with.  My bad. 
> 
>> 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
>>            Fix For: 0.4
>> 
>>        Attachments: TestFifoMappedJobQueue.java
>> 
>> 
>> 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
> 
> 

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

Posted by "Gabe Resneck (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gabe Resneck updated OODT-314:
------------------------------

    Attachment: TestFifoMappedJobQueue.java

I ran into the bug while running the testPromoteJob() test method.  You will see that two jobs are added to the queue (and, as a result, also the job repo) back to back.  I don't think that this is a threading issue because this is done inside the same test, which would all be done on one thread.  I probably just should have posted this to begin with.  My bad. 

> 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
>             Fix For: 0.4
>
>         Attachments: TestFifoMappedJobQueue.java
>
>
> 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

        

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

Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris A. Mattmann updated OODT-314:
-----------------------------------

    Fix Version/s: 0.4

- schedule

> 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
>             Fix For: 0.4
>
>
> 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

        

[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) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13100946#comment-13100946 ] 

Mattmann, Chris A (388J) commented on OODT-314:
-----------------------------------------------

Hey Gabe yeah just need to synchronize the method I think...

Sent from my iPhone




> 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

        

[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) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102982#comment-13102982 ] 

Mattmann, Chris A (388J) commented on OODT-314:
-----------------------------------------------

How can you be sure it was single threaded?

Sent from my iPhone




> 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
>             Fix For: 0.4
>
>
> 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
> 
> 

[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 "Gabe Resneck (JIRA)" <ji...@apache.org>.
    [ 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>.
How can you be sure it was single threaded?

Sent from my iPhone

On Sep 12, 2011, at 1:00 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=13102801#comment-13102801 ] 
> 
> Gabe Resneck commented on OODT-314:
> -----------------------------------
> 
> While I do agree that the methods of the MemoryJobRepository class need to be synchronized, I don't think that it's a multithreading issue that is causing this bug since it occurred on my machine in a single-threaded context.  I ran into the bug while unit testing changes to the JobQueue implementations.  Jobs were being assigned the same ID.
> 
>> 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
>>            Fix For: 0.4
>> 
>> 
>> 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
> 
> 

[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 "Gabe Resneck (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102801#comment-13102801 ] 

Gabe Resneck commented on OODT-314:
-----------------------------------

While I do agree that the methods of the MemoryJobRepository class need to be synchronized, I don't think that it's a multithreading issue that is causing this bug since it occurred on my machine in a single-threaded context.  I ran into the bug while unit testing changes to the JobQueue implementations.  Jobs were being assigned the same ID.

> 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
>             Fix For: 0.4
>
>
> 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

        

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

Posted by "Chris A. Mattmann (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris A. Mattmann updated OODT-314:
-----------------------------------

    Fix Version/s:     (was: 0.4)
                   0.5

- push to 0.5
                
> 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
>             Fix For: 0.5
>
>         Attachments: TestFifoMappedJobQueue.java
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[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 "Gabe Resneck (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103123#comment-13103123 ] 

Gabe Resneck commented on OODT-314:
-----------------------------------

I agree that it does seem unlikely at first glance.  It didn't happen during every test (which was very frustrating), but it seems that if two Dates are created in the same millisecond, then that could cause the bug.

> 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
>             Fix For: 0.4
>
>         Attachments: TestFifoMappedJobQueue.java
>
>
> 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

        

[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 "Gabe Resneck (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103124#comment-13103124 ] 

Gabe Resneck commented on OODT-314:
-----------------------------------

That's ok, just don't let your iPhone autocorrect my last name. =P

> 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
>             Fix For: 0.4
>
>         Attachments: TestFifoMappedJobQueue.java
>
>
> 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>.
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)" <ji...@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
> 
> 

[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 "Gabe Resneck (JIRA)" <ji...@apache.org>.
    [ 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

        

[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) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OODT-314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103119#comment-13103119 ] 

Mattmann, Chris A (388J) commented on OODT-314:
-----------------------------------------------

Thanks gave I'll check it out.

I'm not sure how in a non threaded app new Date() would ever generate the same time but I'll check...

Sent from my iPhone




> 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
>             Fix For: 0.4
>
>         Attachments: TestFifoMappedJobQueue.java
>
>
> 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