Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-940

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.5.1
    • replication
    • None

    Description

      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 )".

      Attachments

        Activity

          People

            equim Martin Alderson
            equim Martin Alderson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: