07 Sep, 2013

1 commit


06 Sep, 2013

12 commits

  • Added ChangelogDB interface to abstract all the remaining code away from JE.
    
    
    
    ChangelogDB.java, ChangelogState.java, Pair.java: ADDED
    
    JEChangelogDB.java: ADDED
    Created from code in ReplicationServer and ReplicationServerDomain.
    
    
    ReplicationServer.java:
    Moved a lot of code to JEChangelogDB.
    Added ChangelogDB field and delegated existing method calls to it.
    Added getChangelogDB().
    Made getChangeNumberIndexDB() package protected for the tests.
    
    ReplicationServerDomain.java:
    Moved a lot of code to JEChangelogDB.
    Replaced sourceDbHandlers field with ChangelogDB field.
    Renamed publishMessage() to publishUpdateMsg().
    FIXME!!!! Bug: generationIdSavedStatus is not protected by synchronized (sourceDbHandlers) !!!!!
    
    ReplicationDbEnv.java:
    Changed void initializeFromChangelogStateDB() to ChangelogState readChangelogState()
    
    
    ExternalChangeLogTest.java:
    Moved from package org.opends.server.replication to org.opends.server.replication.server.
    Extracted method getReplicationDomainStartState()
    
    ChangelogException.java:
    Changed one ctor visibility to public.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9524 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@9523 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • Removed unused getGenerationIdSavedStatus().
    Removed savedStatus parameter from changeGenerationId() and defaulted it to false since all callers were calling it with false.
    
    DataServerHandler.java, ReplicationServerHandler.java, ServerHandler.java:
    Consequence of the change to ReplicationServerDomain.changeGenerationId().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9522 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • * fix JDK6 build - InetAddress.getLoopbackAddress() is JDK7 only.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9521 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • * cache network listener enumeration results for 30s
    * streamline connect thread URL iteration.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9520 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@9519 41b1ffd8-f28e-4786-ab96-9950f0a78031
    violette
     
  • Little code cleanup.
    Extracted a few methods and removed duplicated/unused code.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9518 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@9517 41b1ffd8-f28e-4786-ab96-9950f0a78031
    violette
     
  • Renamed CNIndexData to CNIndexRecord.
    
    
    ChangeNumberIndexDB.java:
    Renamed getCNIndexData(changeNumber),  getFirstCNIndexData(), getLastCNIndexData() to getRecord(changeNumber), getFirstRecord(),  getLastRecord().
    
    ChangeNumberIndexDBCursor.java:
    Renamed getCNIndexData() to getRecord().
    
    
    *.java:
    Consequence of these changes.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9516 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Reviewed by Violette over IM
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9515 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • …ex when upgrading from 2.5.0-Xpress
    
    Reviewed by Violette over IM
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9514 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • - removed start task action (unused)
    - removed verifyTaskType function (unused)
    - used LDIF.search to retrieve backends (rebuild index works only on 'enabled' backend).
    - added rebuild all index task.
     - In case of an upgrade where a rebuild all task is present :
        . All the other single rebuild indexes are bypass.
        . Rebuild-all is launched only if the the user wants to.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9513 41b1ffd8-f28e-4786-ab96-9950f0a78031
    violette
     

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

1 commit