31 Jan, 2014

1 commit


30 Jan, 2014

1 commit


28 Jan, 2014

1 commit

  • 
    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
     

23 Jan, 2014

1 commit


13 Jan, 2014

1 commit


02 Jan, 2014

1 commit


17 Dec, 2013

3 commits

  • Review of the approach: Matthew Swift
    
    
    Problem is caused by code deep into method calls that calls ReplicationServer.shutdown().
    Thread 1 holds a lock on MessageHandler.msgQueue, an exception happens during processing and it then it calls ReplicationServer.shutdown() which then goes and tries to grab JEReplicaDB.msgQueue.
    Thread 2 holds a lock on JEReplicaDB.msgQueue and then tries to grab MessageHandler.msgQueue.
    
    The proper fix is to let the exceptions bubble up to the Thread.run() method, releasing all locks in the process, and call ReplicationServer.shutdown() from there.
    
    
    replication.properties
    Added stack traces to error messages.
    
    ReplicationServerDomain.java:
    Consequence of the change to the error messages, removed the use of MessageBuilder.
    
    JEUtils.java: ADDED
    Factorized all the code closing JE Transactions.
    
    DraftCNDB.java, JEChangeNumberIndexDB.java, ReplicationDB.java:
    Let ChangelogExceptions propagate up.
    Used JEUtils.abort().
    Consequence of the change to the error messages, removed the use of MessageBuilder.
    
    JEReplicaDB.java:
    Handled ChangelogException bubbling up here.
    Extracted stop(Exception) method.
    
    ReplicationDbEnv.java
    removed one shutdownOnException() method.
    Inlined innerShutdownOnException().
    Consequence of the change to the error messages, removed the use of MessageBuilder.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10018 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@10014 41b1ffd8-f28e-4786-ab96-9950f0a78031
    violette
     
  • 
    Checkpoint commit that:
    - adds i18n
    - improves comments and javadocs
    - improved ServerState class to internally use a lock free implementation
    
    
    replication.properties:
    Added 2 error messages.
    
    ServerState.java:
    Made the implementation use ConcurrentMap + removed all synchronized blocks + significantly change the code in update(), removeCSN() and toString().
    Removed getMaxCSN() (never used).
    
    ServerStateTest.java:
    Added asserts to testRemoveCSN().
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10007 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

13 Dec, 2013

2 commits

  • 
    Most of the replace was done by global search replace from Eclipse via regular expressions.
    Individual files had incorrect headers or badly formatted ones, so some of them have been done manually by replacing the content between CDDL HEADER START and CDDL HEADER END.
    Some headers were quoting "trunk/opends/resource/legal-notices/CDDLv1_0.txt" while it should have been "legal-notices/CDDLv1_0.txt".
    
    
    Removed:
    - resource/legal-notices/OpenDS.LICENSE
    
    The following required manual changes:
    - build.xml
    - ext/checkstyle/opendj.sourceheader
    - resource/admin/java-utilities.xsl
    - src/build-tools/org/opends/build/tools/ProcessFilesForPackages.java
    - src/build-tools/windows/*
    - src/pkg/opends-dsml-gateway_proto.py
    - src/pkg/opends_proto.py
    - src/server/org/opends/server/util/ServerConstants.java
    - tests/staf-tests/functional-tests/shared/data/aci/aci_targattrfilter/add_aci18.ldif
    - tests/staf-tests/build.bat
    
    An incorrect header mentionning "exclude" instead of "include" in the copyright header existed for: tests/staf-tests/functional-tests/testcases/backends/backup/**/*
    
    Some files have no copyright headers at all. I did not update them. Here is some of them (more exist):
    - tests/staf-tests/functional-tests/shared/data/core/psearch/**/*.ref
    - tests/staf-tests/functional-tests/shared/data/core/psearch/**/delete.ldif
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9984 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …o TRUE which causes an error in post ugrade task (rebuild-index)
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9981 41b1ffd8-f28e-4786-ab96-9950f0a78031
    violette
     

04 Dec, 2013

1 commit


02 Dec, 2013

1 commit


27 Nov, 2013

1 commit


13 Nov, 2013

1 commit

  • Added more info for ERR_INVALID_COOKIE_SYNTAX.
    
    MultiDomainServerState.java:
    Consequence of the change to ERR_INVALID_COOKIE_SYNTAX.
    In splitGenStateToServerStates(), code clean up.
    
    ExternalChangeLogTest.java:
    Consequence of the change to ERR_INVALID_COOKIE_SYNTAX.
    Used Assertions.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9789 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

12 Nov, 2013

1 commit

  • JEChangelogDB.java:
    Used ConcurrentMap for domainToReplicaDBs.
    Added shutdown field to better protect various code paths against shutdown.
    In getOrCreateReplicaDB(), removed global synchronization block with fined grained synchronization code that is only used on JEReplicaDB creation.
    Added getExistingOrNewDomainMap(), getExistingOrNewReplicaDB().
    Extracted innerShutdownDomain() from shutdownDomain().
    In shutdownDB(), ensured shutdown of all the replicaDBs.
    In shutdownDB(), shutdownDomain() and getOrCreateReplicaDB() check whether the DB is shutting down.
    In removeDomain() and innerShutdownDomain() ensured the domainMap is removed before shutting down the replicaDBs.
    
    replication.properties:
    Added an error message to be used when the DB is shutting down.
    Extracted and separated method init() from JEReplicaDB ctor.
    
    JEReplicaDB.java:
    In ctor, renamed id parameter to serverId + removed queueSize parameter.
    
    JEReplicaDBTest.java:
    Consequence of the change to JEReplicaDB.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9786 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

07 Nov, 2013

1 commit


05 Nov, 2013

1 commit

  • Renamed variables and changed comments to match the new terminology.
    Added more comments to explain what the code is doing.
    
    ReplicationBroker.java
    Renamed replicationServerInfo => rsInfo.
    
    replication.properties
    Removed space characters at the end of each lines.
    
    RSInfo.java:
    In toString(), removed newline + improved formatting.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9775 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

30 Oct, 2013

1 commit

  • In runTask(), improved error logging in case of exceptions.
    Little code cleanup.
    
    TaskThread.java
    Logged the task state after the task finished.
    Comments => javadocs.
    
    backend*.properties:
    Updated NOTICE_TASK_FINISHED_414 message. Updated the translations where I could, otherwise removed them (alas).
    
    replication.properties, LDAPReplicationDomain.java:
    Removed useless spaces in error logging
    
    DSInfo.java:
    In toString(), removed newline + improved formatting.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9762 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

28 Oct, 2013

2 commits

  • replication.properties
    Removed the forbidden final dot from i18n message.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9755 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …r in order to diagnose the causes of these events
    
    
    This change records how each replication server is evaluated by computeBestReplicationServer().
    It also logs why a DS switches from one RS to another RS.
    
    
    ReplicationBroker.java:
    Added static classes RSEvaluations and LocalEvaluation.
    Moved keepBest() method to RSEvaluations.
    In filterServersWithAllLocalDSChanges(), reworked the code to be more understandable + Added method getCSN() and rejectAllWithRSIsLaterThanBestRS(), rejectAllWithRSOnDifferentVMThanDS().
    In computeBestServerWhenConnected(), extracted method isServerOverloadingRS().
    
    replication.properties:
    Added tons of messages.
    
    ComputeBestServerTest.java:
    Moved this class to package org.opends.server.replication.service to match the package of the tested code.
    Consequence of the changes to ReplicationBroker.
    Added methods containsOnly(), getDescription(), getEval1() and getEval2().
    Reformatted the code a bit.
    Removed @throws from javadocs.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9753 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

23 Oct, 2013

1 commit

  • Replaced instance fields with directly storing and using the ReplicationDomainCfg object.
    
    ReplicationBroker.java:
    Replaced instance fields with directly storing and using the ReplicationDomainCfg object.
    Removed start(Set<String>), setChangeTimeHeartbeatInterval() (now useless), and setGroupId() (never used).
    Added getBaseDN(), getReplicationServerUrls(), getGroupId().
    In several methods, used Map.entrySet() instead of Map.keySet() with Map.get(Object)  + renamed replicationServerInfo to rsInfo.
    
    replication.properties:
    Removed now unused message.
    
    
    ReplicationDomain.java:
    Replaced instance fields with directly storing and using the ReplicationDomainCfg object.
    Code cleanups:
    - Removed useless use of "this." for method calls.
    - In processErrorMsg() and processUpdateDone(), collapsed if statements
    - Increased vertical density
    - Extracted method getGenId()
    - In waitForAckIfAssuredEnabled(), used early exit.
    
    
    DomainFakeCfg.java:
    Comments => javadocs
    baseDn => baseDN
    Removed several unused methods.
    Added setWindowSize() + instance member.
    
    *Test*.java
    Used the DomainFakeCfg everywhere + SortedSet instead of Set.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9746 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

17 Oct, 2013

1 commit

  • 
    ReplicationDbEnv.java, replication.properties:
    In openDatabase(), fixed TODOs for i18n.
    In newErrorMessage(), improved error logging by including the DB name.
    
    JEChangelogDB.java:
    Simplified the code by calling domainToReplicaDBs.remove() from inside shutdownReplicaDBs().
    In shutdownReplicaDBs(), do not bother cleaning up the domainMap since it will be removed from domainToReplicaDBs.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9737 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

09 Oct, 2013

1 commit

  • 
    JEChangeNumberIndexDBTest.java:
    Fixed the build.
    
    ChangeNumberIndexDB.java, JEChangeNumberIndexDB.java:
    Improved the javadocs.
    Made instance variables volatile.
    
    *.java:
    First => Oldest
    Last => Newest
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9690 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

25 Sep, 2013

1 commit

  • Review CR-2353
    
    * Removed constraints on the mandatory presence of a PIN, to allow use of empty PIN. 
       These contraints were implemented in several places :
      - configuration files : FileBasedKeyManagerProviderConfiguration.xml, PKCS11KeyManagerProviderConfiguration.xml
      - corresponding provider classes : FileBasedKeyManagerProvider.java, PKCS11KeyManagerProvider.java
      - setup tool : CertificateManager.java, InstallDS.java (for CLI), SecurityOptionsDialog.java (for GUI) 
    
    * Removed corresponding admin messages that are no more used in FileBasedKeyManagerProviderCfgDefn.properties and PKCS11KeyManagerProviderCfgDefn.properties
    * Removed corresponding messages that are no more used in extension.properties and quicksetup.properties
    * Added management of issue JDK-6879539 that prevents usage of empty PIN. This issue occurs on JDK older than JDK7.
    * Modified unit tests according to new behavior : FileBasedKeyManagerProviderTestCase.java, CertificateManagerTestCase.java
    
    * Added a new utility method StaticUtils#stackTraceContainsCause to check if an exception contains a given cause.
    
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9598 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     

06 Sep, 2013

1 commit

  • - 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

2 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
     

03 Sep, 2013

1 commit


12 Aug, 2013

1 commit

  • Hid low level JE's DatabaseException and ReplicationDBException from replication higher level code. They have been replaced by the newly created ChangelogException.
    
    Tidied up the exception handling by throwing or catching more specific exceptions.
    Moved some code to protect them with try / catch.
    Adding a few catch for specific handling of ChangelogException.
    Threw ChangelogException instead of Exception.
    Added handleUnexpectedDatabaseException() methods.
    
    ReplicationDBException.java: REMOVED (now useless)
    
    replication*.properties:
    Removed ERR_COULD_NOT_INITIALIZE_DB, not adding anything to ERR_COULD_NOT_READ_DB.
    
    Removed "this." from member method invocations.
    Used Integer.parseInt().
    Used StaticUtils.close().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9399 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

06 Aug, 2013

1 commit


25 Jul, 2013

1 commit


15 Jul, 2013

1 commit


27 Jun, 2013

1 commit


26 Jun, 2013

1 commit


25 Jun, 2013

1 commit


20 Jun, 2013

2 commits

  • … OpenDJ 2.4.6 to OpenDJ 2.6.0
    
    * add upgrade task which notifies the user that they must rebuild the ds-sync-hist ordering index when upgrading from 2.5.0-Xpress1.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9016 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • The issue was triggered by the mix of AssuredReplication and bad network conditions, which resulted in a deadlock between 2 RS, as both were blocked on writing to the TCP socket and not reading (because waiting on the write lock).
    The solution (more of a workaround) is to have another thread for sending data to the socket and have the reader and writer posting data to send to a queue that this new thread is polling.
    There are still potential deadlocks but they will occur much later, if the sendQueue gets full.  The code needs more work post 2.6 to be fully non blocking, but the changes are enough for now to resolve the customer deadlock case.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@9015 41b1ffd8-f28e-4786-ab96-9950f0a78031
    ludo
     

17 Jun, 2013

1 commit


13 Jun, 2013

1 commit