09 Jul, 2015

3 commits


08 Jul, 2015

6 commits


07 Jul, 2015

7 commits

  • git-svn-id: https://svn.forgerock.org/opendj/trunk@12627 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@12626 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@12625 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    ReplicationCliArgumentParser.java:
    Extracted static class ServerArgs to separate fields named "*1" and "*2" + removed many methods.
    Removed all fields named "*1" and "*2" and added fields server1 and server2 to replace them.
    Extracted methods createServerArgs1() and createServerArgs2().
    
    ReplicationCliMain.java:
    In setConnectionDetails() and setReplicationDetails(), reduced number of parameters.
    Extracted methods getReplicationPortArg() and newBooleanArgument().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12624 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    ServerDescriptor.java:
    Used early exits.
    Extracted methods getPort(), getPortProperty(), isAddReplica().
    Removed areDnsEqual(), duplicate of Utils.areDnsEqual().
    In getReplicationServer(), redirect to getServerRepresentation() to avoid duplicate code.
    
    TopologyCache.java:
    Extracted methods setAgeOfOldestMissingChange() and setMissingChanges().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12623 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    EnableReplicationUserData.java:
    Extracted inner class EnableReplicationServerData.
    Removed all fields named "*1" and "*2" and replaced them with new fields EnableReplicationServerData server1 and server2.
    
    ReplicationCliMain.java:
    Used EnableReplicationUserData.EnableReplicationServerData.
    As a consequence, extracted methods setConnectionDetails(), setReplicationDetails(), checkReplicationServerAlreadyConfigured(), checkReplicationPort(), checkAdminAndReplicationPortsAreDifferent(), addToSets(), configureToReplicateBaseDN(), countReplicationServers(), checkCanMergeReplicationTopologies() to reduce code duplication.
    Extracted methods findSameReplicationServer() and findReplicaInSuffix2() to increase readability.
    Extracted configureServer() from configureServer1() and configureServer2() + removed these 2 methods.
    Moved getValue(String v, String defaultValue) and getValue(int v, int defaultValue) to ReplicationCliArgumentParser.
    Consequence of the changes to ReplicationCliArgumentParser.
    
    ReplicationCliArgumentParser.java:
    Reduced methods visibility + made a few methods static.
    Renamed or inlined various methods.
    Added getValueOrDefault(StringArgument) and getValueOrDefault(IntegerArgument).
    Used ternary operator.
    Extracted method getAdminUidArg()
    
    PurgeHistoricalUserData.java:
    Code cleanups.
    Consequence of the changes to ReplicationCliArgumentParser.
    Removed getValue(String v, String defaultValue) and getValue(int v, int defaultValue).
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12622 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • This patch fixes the existing documentation on entry cache settings,
    and also includes tip in the section about static groups
    to try to avoid large static groups by using dynamic groups if possible,
    and if not to use an entry cache.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12621 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     

06 Jul, 2015

7 commits

  • There, the Selector, Socket and ServerSocket are correctly implementing Closeable.
    
    StaticUtils.java:
    Removed close() methods for Selector, Socket and ServerSocket.
    Changed close(InitialLdapContext) to the more general close(InitialContext).
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12616 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • ReplicationCliMain.java:
    In execute() and enableReplication(), used early exit.
    In disableReplication(), reverted if statement + used early exit.
    Extracted methods checksForNonInteractiveMode(), printSuccessfullyEnabled(), errPrintLn(), configureServer1() configureServer2(), isAnyReplicated().
    In checkSuffixesForDisableReplication(), removed areSuffixRequired parameter, duplicate of displayErrors parameter.
    In getMsg(), removed sProcessed and sUnprocessed which are string versions of processed and unprocessed longs.
    Renamed getMessageForReplicationServerException() into errorConfiguringReplicationServer() and moved it.
    Changed "col.size()>0" to "!col.isEmpty()"
    Used diamond operator.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12615 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Running a search while asking for debug information about filter processing should return for each AVA what happened. 
    If we detect the search can be simplified as a bounded range, though, only partial information is printed, since we "forget" 
    to update the debug information, normally updated by each evaluation.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12614 41b1ffd8-f28e-4786-ab96-9950f0a78031
    fabiop
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@12613 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • ChangelogBackendTestCase.java:
    Fixed the failing searchInCookieModeOnTwoSuffixes() test by adding retry functionality to isOldestCSNForReplica().
    In publishUpdateMessages(), added additional checks.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12610 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • This patch clarifies the wording as suggested by Ludo in the issue
    and as pointed out by Jean-Noel.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12609 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • This patch adds a procedure on limiting privileges.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12607 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     

02 Jul, 2015

3 commits

  • OPENDJ-2184 ECL: wrong number of changes after adding a new replica
    
    Code review: CR-7431
    
    
    
    This problem is linked to OPENDJ-2141, where we introduced a "default" value for a CSN when starting from a changeNumberIndex record.
    
    Explanation: when the server starts up, the newest record is read from the change number index db, so the change number indexer knows where to start.
    From there, we must start all the cursors, and we are using the newest CSN as a starting point.
    The triplet (LESS_THAN_OR_EQUAL_TO_KEY, ON_MATCHING_KEY, newestCsn) is then used to start all cursors, including the cursors for replica DBs created dynamically much after server startup.
    When opening a cursor for any new replica, the provided default CSN cannot be found in the replica DB. Because of this condition and the provided triplet, the file-based changelog code creates an empty cursor.
    Empty cursors cannot be recycled to iterate over the populated replica DB (And in that case, the replica DB already has the change csn3!!).
    
    I think this is incorrect. This change fixes this.
    
    
    
    LogTest.java, LogFileTest.java, BlockLogReaderWriterTest:
    Changed the unit tests, so the returned values match what we need.
    
    Log.java:
    In getCursor(), changed the condition that creates a valid cursor to also include LESS_THAN_OR_EQUAL_TO_KEY.
    
    BlockLogReader.java:
    In positionToKeySequentially() and getMatchingRecord(), removed the code handling LESS_THAN_OR_EQUAL_TO_KEY and AFTER_MATCHING_KEY.
    Renamed positionToKeySequentially() to positionToKey().
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12605 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@12603 41b1ffd8-f28e-4786-ab96-9950f0a78031
    ylecaillez
     
  • ChangelogBackendTestCase.java:
    Introduced assertLastCookieIsEqualTo() to do an equivalent to "wait until keyword suceeds"
    In searchInCookieModeOnTwoSuffixesWithPrivateBackend(), do not forget to close the domain.
    In isOldestCSNForReplica(), fixed error message.
    Overrode getGenerationId() to have a fixed generationId. This ensures messages can always sent from ReplicationBroker to LDAPReplicationDomain and processed.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12600 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

01 Jul, 2015

5 commits

  • git-svn-id: https://svn.forgerock.org/opendj/trunk@12597 41b1ffd8-f28e-4786-ab96-9950f0a78031
    ylecaillez
     
  • This patch works for me with Java 7 and the following command:
    MAVEN_OPTS="-Xmx4g -XX:MaxPermSize=512m -Djava.awt.headless=true" mvn
    -Pman-pages,docs -DskipTests=true clean install site
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12595 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • Hopefully say forever goodbye to randomness of searchInChangeNumberModeOnOneSuffixMultipleTimes().
    
    The fixxed assertion error message was:
    Failure Cause: java.lang.AssertionError: [In entry dn:
    firstchangenumber: 1
    lastchangenumber: 8
    changelog: cn=changelog
    lastExternalChangelogCookie: o=test:00000149a520c3ed04b10000000a;
    incorrect value for attr 'lastchangenumber']
    Expecting:
    <"8">
    to be equal to:
    <"9">
    ignoring case considerations
    org.opends.server.backends.ChangelogBackendTestCase.assertAttributeValue(ChangelogBackendTestCase.java:1381)
    org.opends.server.backends.ChangelogBackendTestCase.assertChangelogAttributesInRootDSE(ChangelogBackendTestCase.java:857)
    org.opends.server.backends.ChangelogBackendTestCase.searchInChangeNumberModeOnOneSuffixMultipleTimes(ChangelogBackendTestCase.java:588)
    
    
    The error was due to the CSN of the 9nth change coming after the previous CSN, based on time.
    How is that possible? I have absolutely no idea since both were created by using which should never go backwards AFAIK.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12594 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • ChangelogBackendTest.java:
    Only stop replication domains and brokers after the test method has finished, not during the test. Otherwise MultimasterReplication.isECLEnabledDomain(DN) risked returning false for valid domains.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12593 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@12592 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

30 Jun, 2015

3 commits


29 Jun, 2015

2 commits

  • git-svn-id: https://svn.forgerock.org/opendj/trunk@12582 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    
    This was found due to one functional test that was working with 2.6 code base, but no longer works with 2.8.
    
    Here is the sequence of events:
    
    time1 change 1 => changenumber=1, changelogcookie=dc=com:csn1;
    time2 ldapsearch (changenumber=1) returns entry with changenumber=1 and changelogcookie=dc=com:csn1;
    time3 enable domain dc=fr
    time4 change 2 => changenumber=2, changelogcookie=dc=com:csn1;dc=fr:csn2;
    
    2.6:
    time5 ldapsearch (changenumber=1) returns entry with changenumber=1 and changelogcookie=dc=com:csn1;dc=fr;
    time6 ldapsearch (changelogcookie=dc=com:csn1;) resultcode=UNWILLING_TO_PERFORM message=Full resynch is required...[...]...use dc=com:csn1;dc=fr;
    time6 ldapsearch (changelogcookie=dc=com:csn1;dc=fr;) resultcode=SUCCESS returns changes with csn1 and csn2
    
    2.8:
    time5 ldapsearch (changenumber=1) returns entry with changenumber=1 and changelogcookie=dc=com:csn1;
    time6 ldapsearch (changelogcookie=dc=com:csn1;) resultcode=UNWILLING_TO_PERFORM message=Full resynch is required...[...]...use dc=com:csn1;dc=fr;
    time6 ldapsearch (changelogcookie=dc=com:csn1;dc=fr;) resultcode=SUCCESS returns changes with csn1 and csn2
    
    Note the different values for changelogcookie attribute at time4.
    
    I think this difference is due to the fact the change number index DB was storing the previous cookie (thus returning it), while the new change number index DB is not storing it anymore (thus building it on the fly). So the new domain baseDN cannot be included until one change has been seen for it.
    
    I think this error message was originally added as the result of a leaky abstraction: In 2.6, doing a search in the cookie mode was driven by the cookie provided by the user. So when a search was performed using a cookie that did not have all domains, no results would be returned for the missing domains. Hence this restriction was added to force users to iterate over all the domains.
    
    With the new changelog implementation, all domains are iterated by default and this restriction is no longer necessary.
    
    By removing this limitation here is how the results would compare:
    
    time1 change 1 => changenumber=1, changelogcookie=dc=com:csn1;
    time2 ldapsearch (changenumber=1) returns entry with changenumber=1 and changelogcookie=dc=com:csn1;
    time3 enable domain dc=fr
    time4 change 2 => changenumber=2, changelogcookie=dc=com:csn1;dc=fr:csn2;
    
    2.6:
    time5 ldapsearch (changenumber=1) returns entry with changenumber=1 and changelogcookie=dc=com:csn1;dc=fr;
    time6 ldapsearch (changelogcookie=dc=com:csn1;) resultcode=UNWILLING_TO_PERFORM message=Full resynch is required...[...]...use dc=com:csn1;dc=fr;
    time6 ldapsearch (changelogcookie=dc=com:csn1;dc=fr;) resultcode=SUCCESS returns changes with csn1 and csn2
    
    2.8:
    time5 ldapsearch (changenumber=1) returns entry with changenumber=1 and changelogcookie=dc=com:csn1;
    time6 ldapsearch (changelogcookie=dc=com:csn1;) resultcode=SUCCESS returns changes with csn1 and csn2
    
    
    
    ReplicationServer.java:
    Removed error ERR_RESYNC_REQUIRED_MISSING_DOMAIN_IN_PROVIDED_COOKIE, no longer necessary with the new changelog implementation.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12580 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

26 Jun, 2015

4 commits

  • ChangelogBackendTestCase.java:
    In generate*Msg(), and searchDNWithBaseScope(), changed baseDN parameter from String to DN.
    In searchChangelogUsingCookie(), changed parameter order: put resultCode before nbEntriesReturned
    In assertAttributeValue(), changed last expectedValue attribute from String to Object + plus converted to String inside the method
    Used some Java 7 goodness.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12579 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • … parallelism in the use of the storage schemes.
    CR-7342.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12578 41b1ffd8-f28e-4786-ab96-9950f0a78031
    ludo
     
  • This patch documents the fields in debugsearchindex attr values.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12577 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • If project.version maven property contains SNAPSHOT keyword, the rpm package release field will be 'SNAPSHOT' plus timestamp. Otherwise it is set to 1.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@12575 41b1ffd8-f28e-4786-ab96-9950f0a78031
    gaetan