10 Feb, 2014

3 commits


07 Feb, 2014

1 commit


05 Feb, 2014

1 commit


04 Feb, 2014

1 commit


03 Feb, 2014

3 commits


31 Jan, 2014

2 commits


30 Jan, 2014

1 commit


29 Jan, 2014

1 commit


28 Jan, 2014

4 commits

  • 
    replication*.properties:
    Added exception stacktraces to NOTICE_READER_EXCEPTION_53.
    
    ServerReader.java:
    In run(), logged the stacktrace when calling logError(). Removed redundant call to logException() which logged to debug logger.
    
    
    Session.java:
    Extracted method read().
    
    
    StaticUtils.java:
    In stackTraceToSingleLineString(), when this is not a debug build, added the exception type at the start of the message.
    
    StaticUtilsTest.java: ADDED
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10202 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Code review: Matthew Swift
    
    Caused by r10049.
    Problem is down to the initialization sequence:
    1. thread 1 - MultimasterReplication.initializeSynchronizationProvider()
    1.1. it creates the ReplicationServerListener
    1.1.1. the ReplicationServerListener in turn creates the ReplicationServer
    1.1.1.1. the ReplicationServer in turn creates the ChangelogDB
    1.1.1.1.1. the ChangelogDB in turn creates the ChangeNumberIndexer thread and STARTs it
    1.1.1.1.1. the ChangelogDB starts the ChangeNumberIndexer thread
    1.2. it proceeds with creating the LDAPReplicationDomain objects one by one
    2. thread 2 - ChangeNumberIndexer.run()
    2.1. it calls ChangeNumberIndexer.initialize()
    2.1.1. ChangeNumberIndexer.initialize() calls MultimasterReplication.isECLEnabledDomain(baseDN)
    
    Steps 1.2. and 2.1.1. are running concurrently.
    If 2.1.1. is run before 1.2. is completed, In ChangeNumberIndexer.initialize():
    1) MultimasterReplication.isECLEnabledDomain(baseDN) returns false, hence a cursor to the relevant replica DBs is not created
    2) then the call to nextChangeForInsertDBCursor.getRecord() returns null, later throwing a NullPointerException because the ChangeNumberIndexer thread is in an illegal state: it was expecting to find an UpdateMsg with the correct CSN stamped on it.
    
    
    
    MultimasterReplication.java:
    Added State enum + state instance member to tell whether MultimasterReplication is ready for work.
    Removed isRegistered instance member superseded by state instance member.
    In isECLEnabledDomain(), completeSynchronizationProvider() and finalizeSynchronizationProvider(), deal with thread waits.
    
    DomainFakeCfg.java:
    Implemented toString().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10200 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@10198 41b1ffd8-f28e-4786-ab96-9950f0a78031
    csovant
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@10196 41b1ffd8-f28e-4786-ab96-9950f0a78031
    ludo
     

25 Jan, 2014

1 commit


23 Jan, 2014

1 commit


17 Jan, 2014

3 commits


13 Jan, 2014

5 commits


09 Jan, 2014

1 commit

  • ReplicationDomain.java:
    Made ieContext private and used an AtomicReference for it + In acquireIEContext() and releaseIEContext(), removed now useless synchronized keyword.
    In acquireIEContext(), returned the created ieContext + changed all client code to assign a variable from the result.
    
    ReplicationDomainTest.java:
    Avoid NPE in case the ieContext is released before the asserts.
    Called ReplicationDomain.getImportExportContext().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10113 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

08 Jan, 2014

3 commits

  • git-svn-id: https://svn.forgerock.org/opendj/trunk@10105 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Reduced members' visibilities in LDAPReplicationDomain + removed several methods.
    
    
    ReplicationDomain.java:
    Do not access the IEContext field several times in one method in case it gets updated in the middle, instead accessed it once at the top of a method and passed it down private method calls.
    Moved importInProgress(), getTotalEntryCount(), getLeftEntryCount() to IEContext class.
    Added getImportExportContext().
    
    LDAPReplicationDomain.java:
    Reduced visibility of many methods.
    Removed followImport field + setFollowImport() which can be calculated from importErrorMessageId + added and used isFollowImport() instead.
    Replaced calls to "retrievesBackend(getBaseDN())" with getBackend() + inlined retrievesBackend().
    Called getImportExportContext() to access the IEContext.
    
    FractionalLDIFImportPlugin.java:
    Consequence of removing LDAPReplicationDomain.setFollowImport().
    In doLDIFImport(), factorized code between branches of an if statement + extracted method isNotEmpty().
    In flushFractionalConfigIntoEntry(), used StaticUtils.collectionToString() + extracted method add()
    
    ReplicationMonitor.java:
    In getMonitorData(), simplified the code.
    
    ReplicationDomainTest.java:
    Extracted methods waitEndExport(), assertExportSucessful(), buildExportedData().
    
    *.java:
    Updated copyright years for r10098.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10103 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Changed a lot of subclasses due to this change.
    
    
    ReplicationDomain.java:
    Pulled up generationId, config fields, getGenerationID(), readAssuredConfig() and needReconnection() methods from LDAPReplicationDomain.
    Replaced baseDN, serverID, groupId, refUrls, initWindow fields with new config field + encapsulated fields, updated getters, removed setters
    Replaced assured, assuredMode, assuredSdLevel, assuredTimeout fields with new assuredConfig field + encapsulated fields, updated getters, removed setters
    Removed domains field, never used.
    Inlined stopDomain().
    Added generationId to the ctor + implemented getGenerationID() + added setGenerationID().
    Extracted method restartService(), needsAck().
    
    LDAPReplicationDomain.java:
    Pulled up generationId, config fields, getGenerationID(), readAssuredConfig() and needReconnection() methods to ReplicationDomain.
    In ctor, consequence of the change to ReplicationDomain.
    
    DSInfo.java:
    Made it immutable.
    
    StartSessionMsg.java:
    Code cleanup.
    Javadocs.
    
    
    DummyReplicationDomain.java, FractionalReplicationTest.java, FakeReplicationDomain.java, FakeStressReplicationDomain.java:
    Consequence of the changes to ReplicationDomain.
    Pulled up generationId, getGenerationID(), setGeneration() to ReplicationDomain.
    Called ReplicationDomain.getConfig().
    
    TopologyViewTest.java:
    Consequence of the change to ReplicationDomain.getRefUrls().
    Extracted method checkLists().
    Code cleanup.
    
    AssuredReplicationServerTest.java:
    Streamlined and simplified the createFakeReplicationDomain() methods + removed the boolean assured parameter.
    Added getAssuredType(AssuredMode).
    In FakeReplicationDomain, consequence of the changes to ReplicationDomain.
    In checkUpdateAssuredParameters(), changed the assert a bit to match removal of the boolean assured parameter.
    Removed useless calls to assertNotNull() after calling createReplicationServer() (result is never null).
    Replaced newFakeCfg() by newDomainConfig().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10098 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

07 Jan, 2014

2 commits


06 Jan, 2014

1 commit


03 Jan, 2014

6 commits

  • Used EnvironmentConfig as a static import to configure JE.
    
    BackendImpl.java:
    Used EnvironmentConfig as a static import to configure JE.
    Called getReadOnlyRootContainer() to remove duplicated code.
    Extracted methods closeTemporaryRootContainer() and getEnvConfigForImport() to remove duplicated code.
    In exportLDIF(), removed many redundant catch blocks and replaced them with only one for IdentifiedException.
    javadoc cleanup.
    
    ConfigurableEnvironment.java, Importer.java, ReplicationDbEnv.java:
    Used EnvironmentConfig as a static import to configure JE.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10080 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Problem was due to the CNIndexDB state not being properly cleaned up.
    I chose to rely on ReplicationTestCase.remove(ReplicationServer) to clean up the state of the ChangeNumberIndexDB.
    
    
    JEChangelogDB.java:
    Extracted getChangeNumberIndexDB(boolean) from getChangeNumberIndexDB().
    
    JEChangeNumberIndexDB.java:
    Removed trimDone field.
    In shutdown(), used Thread.join().
    In run(), removed duplicated code that I unfortunately added there in r9881.
    
    JEChangeNumberIndexDBTest.java:
    Replaced newCNIndexDB() with getCNIndexDBNoTrimming() + Removed createCleanDir() + relied on ReplicationTestCase.remove(ReplicationServer) to clean up the state of the ChangeNumberIndexDB.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10079 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Fixed an infinite loop after r10071 (Why did it not fail when ran locally?) + extracted method assertOnlyNewestRecordIsLeft().
    testClean() this test is still failing in CLI mode, or when you add a dependency towards method testTrim(). I haven't fully grasped yet why is that.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10078 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Code cleanup.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10077 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • More code cleanup and encapsulation.
    
    StartECLSessionMsg.java:
    Introduced enums for ECLRequestType and Persistent.
    Completed javadocs from javadocs coming from ECLServerHandler.
    
    ECLServerHandler.java:
    Replaced individual fields by directly storing the StartECLSessionMsg object.
    Changed visibility to private in a few places.
    Replaced isPersistent() by isNonPersistent() and getSearchPhase() by isInitPhaseDone().
    
    ECLServerWriter.java
    Used better encapsulated methods from ECLServerHandler.
    
    ECLSearchOperation.java, SynchronizationMsgTest.java:
    Consequence of the changes to StartECLSessionMsg.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10076 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Removed duplicate code creating error messages for "badly disconnected" server handlers.
    Follow up on r10074.
    
    
    ServerWriter.java:
    Removed catch NoSuchElementException for an Exception never thrown.
    Factorized + formatted some code.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10075 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac