You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Eugene Tarasov (JIRA)" <ji...@apache.org> on 2011/04/06 16:01:06 UTC

[jira] [Created] (TRANSACTION-41) FileSequence returns the same id for two instances of the same application

FileSequence returns the same id for two instances of the same application
--------------------------------------------------------------------------

                 Key: TRANSACTION-41
                 URL: https://issues.apache.org/jira/browse/TRANSACTION-41
             Project: Commons Transaction
          Issue Type: Bug
    Affects Versions: 1.2
         Environment: Any
            Reporter: Eugene Tarasov
            Priority: Minor


Consider the next situation: Two instances of the same application have been started. And this application uses FileSequence to generate the ID for transactions. FileSequence does not use file locks when it performs read/write operations on files which hold IDs. So, the two instances of the same application potentialy can read the same value from files, which causes different problems. In most applications this never happen, because the probability of this is very low. But on highly loaded systems it happens sometimes.

Possible solution - use file locks. FileSequence.nextSequenceValueBottom tries to get a lock on some file in the beginning. And then it releases lock before exit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TRANSACTION-41) FileSequence returns the same id for two instances of the same application

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

Eugene Tarasov updated TRANSACTION-41:
--------------------------------------

    Affects Version/s: 1.1

> FileSequence returns the same id for two instances of the same application
> --------------------------------------------------------------------------
>
>                 Key: TRANSACTION-41
>                 URL: https://issues.apache.org/jira/browse/TRANSACTION-41
>             Project: Commons Transaction
>          Issue Type: Bug
>    Affects Versions: 1.1, 1.2
>         Environment: Any
>            Reporter: Eugene Tarasov
>            Priority: Minor
>
> Consider the next situation: Two instances of the same application have been started. And this application uses FileSequence to generate the ID for transactions. FileSequence does not use file locks when it performs read/write operations on files which hold IDs. So, the two instances of the same application potentialy can read the same value from files, which causes different problems. In most applications this never happen, because the probability of this is very low. But on highly loaded systems it happens sometimes.
> Possible solution - use file locks. FileSequence.nextSequenceValueBottom tries to get a lock on some file in the beginning. And then it releases lock before exit.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira