07 Jan, 2014

1 commit


06 Jan, 2014

4 commits


03 Jan, 2014

9 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
     
  • Removed duplicate code creating error messages for "badly disconnected" server handlers.
    Reduced coupling by moving a call to ECLServerHandler.refreshEligibleCSN() directly inside ECLServerHandler.takeECLUpdate() + reduced refreshEligibleCSN() visibility to private.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10074 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • … fake LDAP replication domains, so they can participate in the external changelog.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10073 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • … fake LDAP replication domains, so they can participate in the external changelog.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10072 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

02 Jan, 2014

7 commits

  • 
    Never trim the newest (last) record in the ChangeNumberIndexDB from production code.
    This last record contains the last published change number, which is the one that must be read on startup and used to compute the following monotonically increasing change numbers.
    
    
    JEChangeNumberIndexDB.java:
    Improved and fixed javadocs.
    In ctor, factorized code doing twice the same thing. 
    In addRecord(), updated the newestChangeNumber after a newest record is committed.
    In clear(DN, AtomicBoolean), updated the oldestChangeNumber + do not trim the newest record from the DB.
    
    JEChangeNumberIndexDBTest.java:
    Updated testClear() to assert the newest record is never trimmed by production code.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10071 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Updated copyright.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10070 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …ated a fake domain for it, so it participates in the external changelog.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10069 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@10068 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • ChangeNumberIndexer.java:
    Removed useless boolean parameter from ensureCursorExists().
    Changed visibility of getPrecedingCSN() to unit test it.
    
    ChangeNumberIndexerTest.java:
    Added tests for ChangeNumberIndexer.getPrecedingCSN().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10067 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • BoundedWorkQueueStrategy.java:
    Extracted calls to undesired DirectoryServer static methods into overridable methods.
    
    BoundedWorkQueueStrategyTest.java: ADDED
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10066 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Refactor ClassPropertyDefinition and AttributeTypePropertyDefinition classes to 
     replace static setup methods by dynamic setup through new argument in methods
    
    * Introduce new class PropertyDefinitionsOptions to hold options
    ** Provide an immutable version with no validation as constant of the class as it is 
     needed in tests and some classes.
    
    * Pass PropertyDefinitionsOptions as argument to PropertyDefinition#decodeValue
     and PropertyDefinition#validateValue methods
    
    * Update all classes using PropertyDefinition#decodeValue and 
     PropertyDefinition#validateValue methods
    ** For server classes, inject PropertyDefinitionsOptions to ServerManagementContext
     and propagate to classes needing options
    ** For client classes, inject PropertyDefinitionsOptions to LDAPManagementContext
     and LDAPDriver classes and propagate to classes needing options
    ** Exception for three classes - use an immutable PropertyDefinitionsOptions object
     with no validation, as primary purpose is not validation of value :
    *** Class DefaultManagedObject : call decodeValue to copy value
    *** Class Reference : call decodeValue to normalize value
    *** Class ContainsCondition : call decode value to compare value
    
    * Update all test classes to use dynamic setup through PropertyDefinitionsOptions
     when needed instead of static call in setup method
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10065 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     

30 Dec, 2013

3 commits


27 Dec, 2013

1 commit


26 Dec, 2013

4 commits


23 Dec, 2013

9 commits

  • git-svn-id: https://svn.forgerock.org/opendj/trunk@10056 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • 
    The problem was due to incorrect code factorization around cursor creation:
    When creating the cursors, the startAfterCSN to use in different depending on where we come from:
    - during ChangeNumberIndexer initialization, the cursors are already created from the previous cookie, so the provided CSN is the one to use
    - on publishUpdateMsg(), we want the cursor to start exactly with the provided CSN, so we need to create the cursor with the immediately preceding CSN.
    
    
    ChangeNumberIndexer.java:
    In ensureCursorExists(), added boolean parameter startFromPrecedingCSN.
    Added lots of comments.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10055 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • ListenerThread was 100% implemented in terms of ReplicationDomain method calls. It should therefore be part of ReplicationDomain.
    
    * inline ListenerThread into ReplicationDomain and use new DirectoryThread lifecycle methods
    * remove shutdown parameter from ReplicationDomain.processUpdate()
    * reduce visibility of ReplicationDomain.receive()
    * inline ReplicationDomain.processUpdateDoneSynchronous().
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10054 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • * Refactor and clean ConstraintTest in admin.server package
    ** Tests are running without server start
    ** Use data providers for better readability and less code duplication
    
    * Factorize some common helper methods in AdminTestCase class
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10053 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     
  • * ensure that changes are not added to the replay queue twice, e.g. during recovery when the queue already contains uncommitted changes.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10052 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • ** Localize exception
    ** Return exception for all edge cases
    ** Add two new messages in core.properties for edge cases
    
    * Add two new convenience methods LDIF makeEntries and makeEntry that 
       accepts List<String>
    
    * Adapt unit tests to changes
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10051 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     
  • Use LinkedHashMap when filter entries before returning them in search results. This ensures that attributes are mostly returned in the same order that they were requested. I use the word "mostly" because user attributes will still be grouped together ahead of operational attributes.
    
    Verbally reviewed by Ludo.
    
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10050 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • 
    The medium consistency point was not progressing on DSRS 2 because the ChangeNumberIndexer mediumConsistencyCSN had been polluted by CSN from "cn=admin data".
    Problem is that ChangeNumberIndexer's publishUpdateMsg() was filtering out updates from ECL disabled domains, but not from domains unknown to ECL.
    On start up, update messages can be received from replication domains have not been been configured yet on the current replication server.
    The fix consists in only updating the medium consistency point with update messages or replica heartbeats coming from explicitly enabled replication domains.
    After this fix, changes from ECL disabled domains will still be stored in dedicated replicaDBs, there is no change in this functionality.
    
    
    MultimasterReplication.java
    Renamed isECLDisabledDomain() to isECLEnabledDomain() so it caters better for the 3 states of the domains: enabled, disabled and unknown
    Code cleanup.
    
    ChangeNumberIndexer.java:
    Extracted method isECLEnabledDomain() to use as a seam for unit testing which calls to MultimasterReplication.isECLEnabledDomain().
    
    ChangeNumberIndexerTest.java
    Added one test emptyDBThreeInitialDSsOneIsNotECLEnabledDomain().
    Renamed assertAddedRecords() to assertExternalChangelogContent(), startIndexer() to startCNIndexer(), stopIndexer() to stopCNIndexer() and indexer to cnIndexer.
    In startCNIndexer(), overrode ChangeNumberIndexer.isNotECLEnabledDomain().
    
    AttributeTypeConstants.java:
    Added support for "cn"
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10049 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • * Refactor and clean DefaultBehaviorTest in admin.server package
    ** Tests are running without server start
    ** Use data providers for better readability and less code duplication
    
    * Fix issues in ServerManagementContext due to incorrect migration 
       from server code
    ** Decoding of attributes was returning only the first value of 
      multivalued attributes
    
    * Minor naming cleanup
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10048 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     

20 Dec, 2013

2 commits