03 Dec, 2013

1 commit

  • … attribute on 2 different servers
    
    
    Fixed regression introduced in r9788 by introducing a similar behaviour as what the code was doing before.
    
    Replica 1 was trying to read a change done on itself and send it to replica 2, but failed to do so.
    Hence replica 2 did not receive this UpdateMsg and as a consequence could not resolve it.
    
    Previous code was trying to cursor to a specific CSN in the DB. It could not find it, hence tried to move after it in the DB, but could not do it because the end of the DB was reached. Previous was throwing an exception there, later catching it and then returning an empty cursor.
    Newer code removed the useless catch block which let the exception fail this process.
    The fix removed throwing the exception and instead returned an empty cursor.
    
    
    
    ReplicationDB.java:
    In ctor, do not throw an exception, but return an empty cursor instead (Previous code was throwing an exception, catching and ignoring it, then returning an empty cursor).
    
    MessageHandler.java:
    Prevented a NullPointerException from being thrown, then caught and ignored.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9887 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

02 Dec, 2013

14 commits

  • Make sure we filter config/schema files like when reading it, considering only .ldif files.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9884 41b1ffd8-f28e-4786-ab96-9950f0a78031
    ludo
     
  • …sibly leading to further issues.
    Make sure we only consider *.ldif files when handling schemas under config/schema
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9883 41b1ffd8-f28e-4786-ab96-9950f0a78031
    ludo
     
  • 
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9882 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    Hooked the ChangeNumberIndexer thread into our code base.
    Managed thread lifecycle.
    Added configuration to turn it on / off.
    Removed code that builds the ChangeNumberIndexDB from ECLServerHandler.
    
    
    ChangeNumberIndexer.java:
    Added clear() + doClear field for unit tests
    Used thread safe versions of MultiDomainServerState.
    In run(), merged all the try blocks to factorize the catch blocks + supported doClear + fixed a bug with the mediumConsistencyRUV.
    In removeCursor(), closed the cursors.
    Added removeAllCursors(), getPrecedingCSN().
    Renamed crossDomainDBCursor to nextChangeForInsertDBCursor and newCompositeDBCursor() to resetNextChangeForInsertDBCursor().
    Changed newCursors from ConcurrentMap<CSN, DN> to ConcurrentMap<Pair<DN, Integer>, CSN> to ensure minimum memory consumption.
    
    JEChangelogDB.java:
    Removed dbDirectoryName field.
    Added config, cnIndexer fields.
    Changed ctor to accept ReplicationServerCfg.
    In initializeDB(), shutdownDB(), clearDB(), publishUpdateMsg() took appropriate actions with the cnIndexer thread.
    Added setComputeChangeNumber().
    In getCursorFrom(), accept null parameter.
    In setPurgeDelay(), also call it on the cnIndexDB.
    
    
    MultiDomainServerState.java:
    Made implementation to be fully thread safe.
    Changed list from Map to ConcurrentMap + removed synchrnoized blocks.
    Renamed update(DN, ServerState) to replace(DN, ServerState).
    Added new version of update(DN, ServerState).
    
    ECLServerHandler.java:
    Removed assignNewChangeNumberAndStore() that builds the ChangeNumberIndexDB + adapted the code that was using this method.
    Used MultiDomainServerState.replace().
    
    
    ReplicationServerConfiguration.xml, ReplicationServerCfgDefn.properties:
    Added ds-cfg-compute-changenumber.
    
    ExternalChangelogDomainConfiguration.xml, ExternalChangelogDomainCfgDefn.properties:
    Updated description
    
    ReplicationServer.java:
    In applyConfigurationChange(), handled computeChangenumber config.
    Used MultiDomainServerState.replace().
    
    ChangelogDB.java:
    Added setComputeChangeNumber().
    
    ReplServerFakeConfiguration.java:
    Added isComputeChangenumber() and setComputeChangenumber().
    
    
    ExternalChangeLogTest.java:
    Adapted the code to the use of the ChangeNumberIndexer thread.
    
    JEChangeNumberIndexDB.java:
    Extracted runPurge() from run().
    
    
    ReplicationDbEnv.java
    Code cleanup.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9881 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Updated javadoc.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9880 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …mcat6 when OpenDJ is an embeddedDS
    
    * refine the class loading exception handling.
    
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9878 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@9877 41b1ffd8-f28e-4786-ab96-9950f0a78031
    violette
     
  • …mcat6 when OpenDJ is an embeddedDS
    
    * avoid initializing classes during class property value validation as this causes dependencies to be loaded which may be missing in the case where the component is disabled. The class will be fully loaded later if the component is enabled (verified with HTTP connection handler)
    * prevent class loading errors from causing the server initialization to hang
    * attempt to catch and propagate class loading errors up the stack. They are still not displayed in any logs (OPENDJ-1227).
    
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9876 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@9871 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@9869 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • In "prepare-release" target, implemented the check on the URL used for buildings documentation.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9868 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …late 02-config was deleted, added a check on template existence before copying it.
    - Added i18n/path in messages.
    - Added message ouput for post upgrade task.
    - Moved temp file creation as it leaves .temp files in schema folder when upgrade fails.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9867 41b1ffd8-f28e-4786-ab96-9950f0a78031
    violette
     
  • With ivy "resolve" target, separated jar depencencies into "source", "javadoc", "test" and "compile" directories under "lib" directory.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9866 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    
    build.xml:
    Added targets "prepare-release", "check-no-snapshot-dependencies" and "resolve-snapshots-separately".
    
    ivy.xml:
    Now depends on the latest from b2.6-sdk.
    
    
    
    
    Sample output on failure:
    ------------------------------------------------------------------------
    branches/b2.6 $ ant prepare-release
    Buildfile: /opendj2/branches/b2.6/build.xml
    Trying to override old definition of task javac
    
    clean-lib:
    
    check-ivy-installed:
    
    download-ivy:
    
    install-ivy:
    
    resolve-snapshots-separately:
    [ivy:retrieve] ...
    [ivy:retrieve]  23 artifacts copied, 0 already retrieved (9038kB/30ms)
    
    check-no-snapshot-dependencies:
    
    BUILD FAILED
    /opendj2/branches/b2.6/build.xml:2775: The project must not depend on snapshot dependencies. Found: opendj-ldap-sdk-2.6.5-SNAPSHOT.jar;opendj-rest2ldap-2.6.5-SNAPSHOT.jar;opendj-rest2ldap-servlet-2.6.5-SNAPSHOT.jar;opendj-server2x-adapter-2.6.5-SNAPSHOT.jar
    ------------------------------------------------------------------------
    
    
    
    
    Sample output on success:
    ------------------------------------------------------------------------
    [ivy:retrieve]  23 artifacts copied, 0 already retrieved (9038kB/28ms)
    
    check-no-snapshot-dependencies:
         [echo] OK.
    
    prepare-release:
         [echo] 
         [echo] Previous checks succeeded.
         [echo] 
         [echo] Please:
         [echo] 1- Check the archive has no build number
         [echo] 2- Check the archive contains the license
         [echo] 3- Run the tests
         [echo] 4- Check that documentation refers to forgerock.com instead of forgerock.org
         [echo]     
    ------------------------------------------------------------------------
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9865 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

29 Nov, 2013

3 commits

  • LDAPReplicationDomain.java:
    In parseFractionalConfig(), added back the null checks on the Iterator because some client code passes in null.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9863 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • LDAPReplicationDomain.java:
    Removed private modifier that was added too eagerly.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9861 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Added missing spaces in exception messages.
    Extracted methods getExpandedNames() and needsExpanding() from getIncludedAttributes().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9860 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

28 Nov, 2013

2 commits

  • ExternalChangeLogTest.java:
    In searchOnChangelog(), added the parameters expectedNbEntries and testName + added a loop that tries during 1s to get the expected number of entries + moved assert on nb of returned entries here + moved calls to debugAndWriteEntries() here.
    Removed now unnecessary calls to Thread.sleep().
    Added assertSuccessful(LDAPMessage).
    Reduced scope for variables of type SearchResultDoneProtocolOp or SearchResultEntryProtocolOp + removed now useless statements making use of them.
    In ECLCompatWriteReadAllOps(), removed useless calls to toLowercase().
    Used Assertions.assertThat().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9857 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Added toString() for debuggging.
    Added or completed javadocs.
    Fixed a little bug in test code.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9852 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

27 Nov, 2013

2 commits


23 Nov, 2013

3 commits


22 Nov, 2013

6 commits

  • ExternalChangeLogTest.java:
    In getAttributeValue(), added null check.
    Removed getAttributeValueOrNull() replaced by getAttributeValue().
    Removed checkPossibleValues(), replaced by checkValue().
    In readLastCookie(), called getAttributeValue() and removed useless catch.
    Extracted method checkAttributeValue().Used Assertions.as() - thanks Nicolas for the trick.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9831 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • ReplicationDB.java:
    Always unlock the readLock when no cursor is held. Fix is similar to r9542 for DraftCNDB.DraftCNDBCursor .
    Do not release read lock twice.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9830 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • ReplicationDB.java:
    Always unlock the readLock when no cursor is held. Fix is similar to r9542 for DraftCNDB.DraftCNDBCursor .
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9829 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …ngeNumberIndexDB to ChangelogDB
    
    
    Properly implemented the medium consistency point algorithm with heartbeats and replicas going offline.
    
    
    ChangeNumberIndexer.java:
    Added replicasOffline instance field.
    Added methods replicaOffline() and removeCursor().
    In moveForwardMediumConsistencyPoint(), updated the code to cater for offline replica.
    
    ChangeNumberIndexerTest.java:
    Added new tests for heartbeat and replica going offline.
    
    
    MultiDomainServerState.java, ServerState.java:
    Added removeCSN().
    
    MultiDomainServerStateTest.java, ServerStateTest.java:
    Added more tests.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9828 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …ngeNumberIndexDB to ChangelogDB
    
    
    Properly implemented the medium consistency point algorithm.
    
    
    ChangeNumberIndexer.java:
    Renamed instance field previousCookie to mediumConsistencyRUV and mediumConsistencyPoint to lastSeenUpdates.
    Added mediumConsistencyCSN instance field.
    Changed newCursors from ConcurrentMap<Integer, DN> to ConcurrentMap<CSN, DN>.
    In tryNotify(), removed CSN parameter.
    Added methods canMoveForwardMediumConsistencyPoint() and moveForwardMediumConsistencyPoint().
    
    
    ChangeNumberIndexerTest.java:
    Updated to reflect how the medium consistency point algorithm should work.
    
    MultiDomainServerState.java:
    Renamed get() to getCSN().
    
    ServerState.java
    In update(), updated javadocs + renamed local variables.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9827 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Extracted methods findFirstNonSpaceCharPosition(), base64Decode() and decodeDN().
    In readAttribute(), moved common code out of if/else branches.
    Used early exits.
    Removed useless parenthesis.
    Condensed code and comments on one line where possible.
    
    LDIFWriter.java:
    Extracted methods writeDN(), writeAttribute().
    In writeEntries(), simplified the code.
    In writeModifyChangeRecord(), removed useless switch statement.
    In appendLDIFSeparatorAndValue(), removed duplicate code.
    Removed useless parenthesis.
    Comments => javadocs
    Condensed code and comments on one line where possible.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9826 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

21 Nov, 2013

8 commits


20 Nov, 2013

1 commit