You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Martin Alderson (JIRA)" <ji...@apache.org> on 2007/05/23 15:56:16 UTC

[jira] Created: (DIRSERVER-940) Operation fails if previous operation occurred in the same "millisecond"

Operation fails if previous operation occurred in the same "millisecond"
------------------------------------------------------------------------

                 Key: DIRSERVER-940
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-940
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: mitosis
    Affects Versions: 1.5.0
            Reporter: Martin Alderson


When an operation is processed by mitosis it is logged with a unique "CSN".  This is supposed to be made unique by 3 values: current timestamp, replica ID and operation sequence number.

If the previous operation was logged in the same millisecond "window" (as reported by System.currentTimeMillis()) then mitosis attempts to log the new operation with an equivalent CSN causing the whole operation to fail (with a hidden SQL Exception).  This is due to the operation sequence number being re-zeroed when the timestamps match.  I believe the intention here was to re-zero the sequence number when the timestamps do _not_ match.

The fix can be made to org.apache.directory.mitosis.common.DefaultCSNFactory.newInstance by changing "if ( lastTimestamp == newTimestamp )" to "if ( lastTimestamp != newTimestamp )".



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DIRSERVER-940) Operation fails if previous operation occurred in the same "millisecond"

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

Martin Alderson closed DIRSERVER-940.
-------------------------------------


> Operation fails if previous operation occurred in the same "millisecond"
> ------------------------------------------------------------------------
>
>                 Key: DIRSERVER-940
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-940
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: mitosis
>    Affects Versions: 1.5.0
>            Reporter: Martin Alderson
>            Assignee: Martin Alderson
>             Fix For: 1.5.1
>
>
> When an operation is processed by mitosis it is logged with a unique "CSN".  This is supposed to be made unique by 3 values: current timestamp, replica ID and operation sequence number.
> If the previous operation was logged in the same millisecond "window" (as reported by System.currentTimeMillis()) then mitosis attempts to log the new operation with an equivalent CSN causing the whole operation to fail (with a hidden SQL Exception).  This is due to the operation sequence number being re-zeroed when the timestamps match.  I believe the intention here was to re-zero the sequence number when the timestamps do _not_ match.
> The fix can be made to org.apache.directory.mitosis.common.DefaultCSNFactory.newInstance by changing "if ( lastTimestamp == newTimestamp )" to "if ( lastTimestamp != newTimestamp )".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRSERVER-940) Operation fails if previous operation occurred in the same "millisecond"

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

Emmanuel Lecharny updated DIRSERVER-940:
----------------------------------------

    Fix Version/s: 1.5.2

postponed to 1.5.2

> Operation fails if previous operation occurred in the same "millisecond"
> ------------------------------------------------------------------------
>
>                 Key: DIRSERVER-940
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-940
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: mitosis
>    Affects Versions: 1.5.0
>            Reporter: Martin Alderson
>             Fix For: 1.5.2
>
>
> When an operation is processed by mitosis it is logged with a unique "CSN".  This is supposed to be made unique by 3 values: current timestamp, replica ID and operation sequence number.
> If the previous operation was logged in the same millisecond "window" (as reported by System.currentTimeMillis()) then mitosis attempts to log the new operation with an equivalent CSN causing the whole operation to fail (with a hidden SQL Exception).  This is due to the operation sequence number being re-zeroed when the timestamps match.  I believe the intention here was to re-zero the sequence number when the timestamps do _not_ match.
> The fix can be made to org.apache.directory.mitosis.common.DefaultCSNFactory.newInstance by changing "if ( lastTimestamp == newTimestamp )" to "if ( lastTimestamp != newTimestamp )".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRSERVER-940) Operation fails if previous operation occurred in the same "millisecond"

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

Martin Alderson resolved DIRSERVER-940.
---------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.5.2)
                   1.5.1
         Assignee: Martin Alderson

Fixed by having the operation sequence number always incremented when a new CSN is generated which also gives us some protection against system clock changes.

> Operation fails if previous operation occurred in the same "millisecond"
> ------------------------------------------------------------------------
>
>                 Key: DIRSERVER-940
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-940
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: mitosis
>    Affects Versions: 1.5.0
>            Reporter: Martin Alderson
>            Assignee: Martin Alderson
>             Fix For: 1.5.1
>
>
> When an operation is processed by mitosis it is logged with a unique "CSN".  This is supposed to be made unique by 3 values: current timestamp, replica ID and operation sequence number.
> If the previous operation was logged in the same millisecond "window" (as reported by System.currentTimeMillis()) then mitosis attempts to log the new operation with an equivalent CSN causing the whole operation to fail (with a hidden SQL Exception).  This is due to the operation sequence number being re-zeroed when the timestamps match.  I believe the intention here was to re-zero the sequence number when the timestamps do _not_ match.
> The fix can be made to org.apache.directory.mitosis.common.DefaultCSNFactory.newInstance by changing "if ( lastTimestamp == newTimestamp )" to "if ( lastTimestamp != newTimestamp )".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.