05 Sep, 2013

5 commits

  • …th a dot, unlike Javadoc)
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9512 41b1ffd8-f28e-4786-ab96-9950f0a78031
    ludo
     
  • 
    Fixed a few bugs (introduced in the previous commits?):
    - All code must check that the result of calling ChangeNumberIndexDB.getFirstCNIndexData() and ChangeNumberIndexDB.getLastCNIndexData() are not null (if the DB is empty, or closed, etc.).
    - In ReplicationServer.clearGenerationId(), the code could have a side effect if the last entry in the DB was cleared by this method: the lastGeneratedChangeNumber would be allowed to go back!
    
    
    ChangeNumberIndexDB.java:
    Removed getLastChangeNumber().
    
    DraftCNDbHandler.java:
    Inlined getLastChangeNumber() to the only remaining method caller ReplicationServer.getChangeNumberIndexDB().
    Finally changed the implementation of isEmpty() to something less costly.
    
    DraftCNDbHandlerTest.java:
    Inlined getFirstChangeNumber() and getLastChangeNumber().
    
    
    ReplicationServer.java:
    In clearGenerationId(), removed the code changing the value of lastGeneratedChangeNumber: lastGeneratedChangeNumber is not allowed to go backward.
    In getChangeNumberIndexDB(), inlined here the code of DraftCNDbHandler.getLastChangeNumber() + removed useless use of MessageBuilder.
    In getECLChangeNumberLimits(), added a null check for the result of getLastCNIndexData().
    
    replication.properties:
    Added a new error message.
    Changed MILD_ERR_DRAFT_CHANGENUMBER_DATABASE_173 to MILD_ERR_CHANGENUMBER_DATABASE_173.
    
    
    ECLServerHandler.java:
    In findCookie(), replaced the DB empty checks by null checks on the return of getFirstCNIndexData() and getLastCNIndexData() since this is purely equivalent.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9511 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@9510 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Remainder of r9504: changed changeNumber from int to long.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9509 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    Added CNIndexData class to replace the conjunct use of the (CSN, baseDN, previousCookie) tuple along with the changeNumber.
    It allowed to replace:
    - several parameters list with all theses types
    - several groups of methods returning instances of these types with duplicate code in the implementation.
    
    Remainder of r9504: changed changeNumber from int to long.
    
    
    CNIndexData.java: ADDED
    
    *.java:
    Consequence of introducing CNIndexData class.
    
    
    ECLServerHandler.java:
    Renamed releaseIterator() into releaseCursor().
    In getNextECLUpdate(), aggregated consecutive if statements + added a debugInfo().
    Renamed assignNewDraftCNAndStore() to assignNewChangeNumberAndStore().
    Changed changeNumber from int to long.
    
    ChangeNumberIndexDB.java:
    Replaced getCSN(), getBaseDN() and getPreviousCookie() by getCNIndexData().
    Renamed getFirstChangeNumber() to getFirstCNIndexData().
    Added getLastCNIndexData().
    Changed add() signature.
    
    DraftCNDbHandler.java
    Consequence of the change to implemented interface ChangeNumberIndexDB.
    Changed changeNumber from int to long.
    Added getChangeNumber().
    
    
    ChangeNumberIndexDBCursor.java:
    Replaced getCSN(), getBaseDN() and getPreviousCookie() by getCNIndexData().
    
    DraftCNDbIterator.java
    Consequence of the change to implemented interface ChangeNumberIndexDBCursor.
    
    
    DraftCNData.java:
    Added changeNumber field + getter.
    Replaced fields value, baseDN and csn by cnIndexData + getters.
    Renamed readFirstChangeNumber() and readLastChangeNumber() to readFirstCNIndexData() and readLastCNIndexData().
    Added newCNIndexData().
    In inner class DraftCNDBCursor, Field key is now a ReplicationDraftCNKey (was DatabaseEntry) + DraftCNData field has been replaced with CNIndexData + entry is initialized on construction.
    Replaced currentValue(), currentBaseDN(), currentCSN() and currentKey() by currentData().
    Removed getKey().
    
    ReplicationDraftCNKey.java:
    Added a default ctor.
    In getChangeNumber(), matched the code in DraftCNDB.
    
    DraftCNDbHandlerTest.java:
    Added assertEqualTo(), getFirstChangeNumber(), getLastChangeNumber(), getPreviousCookie().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9508 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

04 Sep, 2013

11 commits

  • git-svn-id: https://svn.forgerock.org/opendj/trunk@9507 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • Change one field from Long to long.
    
    SearchOperationBasis*.java:
    Extracted method getSizeLimit() and getTimeLimit().
    
    ExternalChangeLogTest.java:
    Simplified the code.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9506 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    ChangeNumberIndexDB.java:
    All methods can now throw ChangelogException.
    
    
    ReplicationServer.java:
    Extracted method shutdownCNIndexDB().
    Removed getFirstChangeNumber() and getLastChangeNumber().
    
    DraftCNDbHandler.java:
    Removed catch blocks and let the exception propagate.
    
    ECLServerHandler.java:
    Let the ChangelogException propagate.
    
    
    ReplicaDBCursor.java:
    Augmented the javadoc to explain the sort order. Follow up of r9504.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9505 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    After talking Matthew's over the phone review, did a few changes described down below.
    
    *.java:
    Changed changeNumber from int to long throughout the replication code base.
    
    ECLUpdateMsg.java:
    In getBytes(), did not complete the change to long because it would require a protocol version change.
    
    
    ReplicaDBCursor.java:
    Now extends Comparable.
    
    ReplicaDBCursorComparator.java: REMOVED
    Code has been moved to JEReplicaDBCursor.compareTo().
    
    
    ChangeNumberIndexDB.java:
    Does not extend Runnable anymore (mistake from earlier refactorings).
    
    DraftCNDbHandler.java:
    Now extends Runnable.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9504 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • * all impacted tests pass.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9503 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@9502 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • - "draft change number" to "change number"
    - "draftCN" to "change number"
    - "sn" to "cn" in tests.
    Fixed wrong usage of seqnum (only defined for CSNs - see the various IETF draft)
    
    Now remains to rename a few classes.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9501 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • In flushFractionalConfigIntoEntry(), changed code to fix build break from r9497.
    In doLDIFImport(), extracted method getAttribute() + used early exit .
    Used javadocs instead of comments.
    Removed redundant comments.
    Used static imports.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9500 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Fixed a small bug that I introduced in the previous commit by removing ENTRYUUID from the Set of attributes. Also, apparently "*" encodes for user attributes (and not operational).
    
    ExternalChangeLogTest.java:
    In ALL_ATTRIBUTES, changed the order of the attributes to match the order mentioned in the javadoc.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9499 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • - ChangelogDB to ChangeNumberIndexDB
    - ChangelogDBIterator to ChangeNumberIndexDBCursor
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9498 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • In loadGenerationId(), fixed a bug.
    Removed allOperationalAttributes() and replaced it with ALL_OPERATIONAL_ATTRS constant. Cannot remove HISTORICAL_ATTRIBUTE_NAME from it otherwise HistoricalTest and ExternalChangeLogTest start to fail.
    Used Sets instead of Lists to avoid duplicate entries and the code does not care about ordering.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9497 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

03 Sep, 2013

5 commits


02 Sep, 2013

5 commits


30 Aug, 2013

7 commits


29 Aug, 2013

7 commits