11 Dec, 2013
3 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9961 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Extracted method hasGroupMembershipUpdateControl(). In loadGroup(), used StaticUtils.collectionToString(). Automatic code cleanups. git-svn-id: https://svn.forgerock.org/opendj/trunk@9960 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
SetPropSubCommandHandler.java: Extracted methods parseValue() and getPropertyDefinition(). Argument.java: Improved the toString() + javadocs. Minor code cleanups. ArgumentParser.java: Removed one parseArguments() method - never used. Extracted method indentAndWrap() to match SubCommandArgumentParser. Minor code cleanups. SubCommandArgumentParser.java: Removed one parseArguments() method - never used. Minor code cleanups. DsconfigOptionsTestCase.java: Added testGenerateDoc(). Minor code cleanups. git-svn-id: https://svn.forgerock.org/opendj/trunk@9959 41b1ffd8-f28e-4786-ab96-9950f0a78031
10 Dec, 2013
2 commits
-
* ensure that temporary enviroment is always closed. git-svn-id: https://svn.forgerock.org/opendj/trunk@9955 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Implemented toString(). Code cleanup. git-svn-id: https://svn.forgerock.org/opendj/trunk@9951 41b1ffd8-f28e-4786-ab96-9950f0a78031
09 Dec, 2013
2 commits
-
Code review: Matthew Swift Regression caused by the fix for OPENDJ-948 unauthorized disclosure of directory contents. The code was looking for the entry matching the DN we are adding which obviously was null here. Since it was null, the code went on to wrongly check the following conditions: op.isInternalOperation() || op.isSynchronizationOperation() || op.isInnerOperation(). The correct fix was to avoid calling AccessControlHandler.canDiscloseInformation() where it did not make sense at all, when there was no info to protect yet. LocalBackend*Operation.java: Do not call the setResultCodeAndMessageNoInfoDisclosure() when we fail to grab a lock, because this is not disclosing any sensitive information at that point. LocalBackendAddOperation.java: Do not call the setResultCodeAndMessageNoInfoDisclosure() when we fail to grab a lock, because this is not disclosing any sensitive information at that point. In lockParent(), reversed the exception to make the code easier to read. LocalBackendModifyDNOperation.java: Do not call the setResultCodeAndMessageNoInfoDisclosure() when we fail to grab a lock, because this is not disclosing any sensitive information at that point. In newDirectoryException(), removed the entryDN parameter since now this method is always called with a non null entry. AciHandler.java: Code cleanup git-svn-id: https://svn.forgerock.org/opendj/trunk@9943 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ReplicationServerDomain.java: Fixed NPEs in stopStatusAnalyzer() and stopMonitoringPublisher(). In getEligibleCSN(), removed useless null checks. ServerWriter.java: Code cleanup. git-svn-id: https://svn.forgerock.org/opendj/trunk@9941 41b1ffd8-f28e-4786-ab96-9950f0a78031
06 Dec, 2013
8 commits
-
…s a user with insufficient access rights Fixed ConcurrentModificationException introduced in r7972 for OPENDJ-475: Incorrect behaviour/result code regarding non-critical controls. The ConcurrentModificationExcepotion was hidden via several method calls, but generally it takes such form: 1. for (Control c : Operation.getRequestControls()) - directly or via indirect calls 2. AccessControlHandler.isAllowed() 2.1. Operation.removeRequestControl() 3. ConcurrentModificationException on next loop iteration at 1. LocalBackendWorkflowElement.java: Replaced isControlAllowed() by removeAllDisallowedControls() that uses Iterator.remove() instead of Operation.removeRequestControl(). LocalBackend*Operation.java: In handleRequestControls(), processControls() and processRequestControls(), called LocalBackendWorkflowElement.removeAllDisallowedControls() before the for loop + removed call to LocalBackendWorkflowElement.isControlAllowed() in the loop body. Tiny code cleanups. ExtendedOperationBasis.java, ECLSearchOperation.java: Used Iterator.remove() instead of Operation.removeRequestControl(). MultimasterReplication.java: In findDomain(), used Iterator.remove() instead of Operation.removeRequestControl() + simplified the while loop code. Operation.java, OperationWrapper.java, PreParseOperation.java: Removed now unused removeRequestControl(). AbstractOperation.java: Consequence of the change to Operation. little code tidy up. git-svn-id: https://svn.forgerock.org/opendj/trunk@9934 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Extracted method normalizeArguments(). Made printVersion() protected. SubCommandArgumentParser.java: Removed normalizeArguments() and printVersion(). Extracted method indentAndWrap2(). In isUsageArgumentPresent() and isVersionArgumentPresent(), code cleanup. In toRefSect2(), used a StringBuilder. git-svn-id: https://svn.forgerock.org/opendj/trunk@9933 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
- fixed upgrade (removed white spaces in upgrade tasks, added Filter instead of LDAPFilter, added matcher and setting schema default matching rule/syntax.) git-svn-id: https://svn.forgerock.org/opendj/trunk@9932 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Moved try / catch / ignore inside getUsage() methods. Extracted method printVersion(), dashVAccepted() and normalizeArguments(). Code cleanups. git-svn-id: https://svn.forgerock.org/opendj/trunk@9931 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
- fixed Rebuild Index git-svn-id: https://svn.forgerock.org/opendj/trunk@9928 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…mentStats appearing frequently in debug logs * avoiding collecting buggy stats. git-svn-id: https://svn.forgerock.org/opendj/trunk@9926 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
AbstractOperation.java: Replaced javadocs duplicated from Operation interface by {@inheritDoc}. Put {@inheritDoc} on one line only. Removed empty lines. Little code formatting. git-svn-id: https://svn.forgerock.org/opendj/trunk@9925 41b1ffd8-f28e-4786-ab96-9950f0a78031 -
WhoAmIExtendedOperation.java: Initialized supportedControlOIDs once and for all. Applied automatic refactorings ECLSearchOperation.java: Applied automatic refactorings git-svn-id: https://svn.forgerock.org/opendj/trunk@9924 41b1ffd8-f28e-4786-ab96-9950f0a78031
05 Dec, 2013
4 commits
-
Code review: Matthew Swift Fixing failing unit tests, removed the following stack trace which makes test and code fail. [testng] Failed Test: org.opends.server.replication.plugin.HistoricalCsnOrderingTest#buildAndPublishMissingChangesSeveralEntriesTest [testng] Failure Cause: com.sleepycat.je.ThreadInterruptedException: (JE 5.0.97) Environment must be closed, caused by: com.sleepycat.je.ThreadInterruptedException: Environment invalid because of previous exception: (JE 5.0.97) <https://builds.forgerock.org/job/OpenDJ%20-%20trunk%20-%20postcommit/ws/build/unit-tests/package-instance/HistoricalCsnOrdering> Thread interrupted prior to logging the commit THREAD_INTERRUPTED: InterruptedException may cause incorrect internal state, unable to continue. Environment is invalid and must be closed. [testng] com.sleepycat.je.ThreadInterruptedException.wrapSelf(ThreadInterruptedException.java:99) [testng] com.sleepycat.je.dbi.EnvironmentImpl.checkIfInvalid(EnvironmentImpl.java:1594) [testng] com.sleepycat.je.Database.checkEnv(Database.java:2154) [testng] com.sleepycat.je.Database.getDatabaseName(Database.java:1939) [testng] org.opends.server.replication.server.changelog.je.ReplicationDbEnv.closeDB(ReplicationDbEnv.java:457) [testng] org.opends.server.replication.server.changelog.je.ReplicationDbEnv.shutdown(ReplicationDbEnv.java:435) [testng] org.opends.server.replication.server.changelog.je.JEChangelogDB.shutdownDB(JEChangelogDB.java:409) [testng] org.opends.server.replication.server.ReplicationServer.shutdown(ReplicationServer.java:702) [testng] org.opends.server.replication.server.ReplicationServer.remove(ReplicationServer.java:1028) [testng] org.opends.server.replication.plugin.HistoricalCsnOrderingTest.buildAndPublishMissingChangesSeveralEntriesTest(HistoricalCsnOrderingTest.java:308) DirectoryThread.java: In initiateShutdown(), removed the call to Thread.interrupt() added in r9911. ChangeNumberIndexer.java: Overrode initiateShutdown() to stop this thread on shutdown: used notify() to wake up the thread if it was waiting. In run(), checked whether shutdown has been initiated for this thread before calling wait(): this protects against missed notifications. JEReplicaDB.java: In run(), removed call to Thread.currentThread().interrupt(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9918 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…veDB() which then calls ReplicationDB.shutdown(). Code is blocked acquiring a writeLock on the dbCloseLock, but a readLock is never unlocked. Debugging showed that the ChangeNumberIndexDB is holding a cursor on a ReplicationDB, said cursor holds the readLock. Despite the ChangeNumberIndexer thread being asked to initiateShutdown(), the thread is waiting indefinitely for new changes which will never come. DirectoryThread.java: In initiateShutdown(), call interrupt() to ensure the thread will be interrupted if it calls Object.wait() before checking whether it needs to shutdown, or if it is already waiting. git-svn-id: https://svn.forgerock.org/opendj/trunk@9911 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Removed change which was not intended for commit, at least not for now. git-svn-id: https://svn.forgerock.org/opendj/trunk@9910 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
… then calls ReplicationDB.shutdown(). Code is blocked acquiring a writeLock on the dbCloseLock, but a readLock is never unlocked. Debugging showed that the ChangeNumberIndexDB is holding a cursor on a ReplicationDB, said cursor holds the readLock. The solution is to not try to call ReplicationDB.shutdown() in ReplicationServerDomain.shutdownDomain() because it will be closed by JEChangelogDB.shutdownDB(). ReplicationServerDomain.java: Removed the call to ReplicationDB.shutdownDomain(DN). ReplicationDomainDB.java, JEChangelogDB.java: Removed shutdownDomain(DN) which was never used outside of a complete shutdown of the ReplicationServer. Inlined innerShutdownDomain(). JEReplicaDBCursor.java: In next(), extracted a local variable to protect against a concurrent update to the cursor field. git-svn-id: https://svn.forgerock.org/opendj/trunk@9909 41b1ffd8-f28e-4786-ab96-9950f0a78031
04 Dec, 2013
3 commits
-
In run(), made sure all cursors are properly closed, even in case of a RuntimeException terminating the thread. Moved resetNextChangeForInsertDBCursor() out of removeAllCursors(). In removeAllCursors(), closed the CompositeDBCursor. ServerHandler.java: Made shutdownWriter volatile. JEReplicaDBCursor.java: Avoided a NullPointerException. git-svn-id: https://svn.forgerock.org/opendj/trunk@9901 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Fixed problem introduced in r9887: an open cursor was never released. ReplicationDB.java: In ctors, made sure we always call close on a cursor when it is not held. This will permanently fix such issues in the ctors. Other changes are just formatting changes. git-svn-id: https://svn.forgerock.org/opendj/trunk@9899 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
CR-2657. git-svn-id: https://svn.forgerock.org/opendj/trunk@9898 41b1ffd8-f28e-4786-ab96-9950f0a78031
03 Dec, 2013
3 commits
-
Don't check server-id for replication servers. git-svn-id: https://svn.forgerock.org/opendj/trunk@9891 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
(ERROR) [03/Dec/2013:12:10:55 +0100] category=CORE severity=FATAL_ERROR msgID=327820 msg=An uncaught exception during processing for thread Change number indexer has caused it to terminate abnormally. The stack trace for that exception is: NullPointerException (ChangeNumberIndexer.java:337 ChangeNumberIndexer.java:324 ChangeNumberIndexer.java:266 ChangeNumberIndexer.java:355) ChangeNumberIndexer.java: In getPrecedingCSN(), handled the null case. git-svn-id: https://svn.forgerock.org/opendj/trunk@9888 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
… 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
02 Dec, 2013
9 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
-
…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
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9882 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
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
-
Updated javadoc. git-svn-id: https://svn.forgerock.org/opendj/trunk@9880 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…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
-
…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
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9871 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…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
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
-
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
-
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
28 Nov, 2013
1 commit
-
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
27 Nov, 2013
2 commits
-
… which was preventing sync operations from bypassing backend INTERNAL_ONLY mode. git-svn-id: https://svn.forgerock.org/opendj/trunk@9843 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9842 41b1ffd8-f28e-4786-ab96-9950f0a78031