matthew

matthew

committed 306 to commons

23 May
Update to latest forgerock parent in order to pull in Checkstyle and Javadoc rules.
matthew

committed 305 to commons

23 May
* fix bug in string parsing of trailing slashes
* add support for obtaining relative pointers which can be useful when recursively processing JSON objects.

matthew

committed 304 to commons

23 May
Back out changes to pom.xml committed by accident in previous commit.
matthew

committed 8016 to opendj

22 May
Exclude core attributes from attribute mapper.
matthew

committed 8013 to opendj

21 May
Relax attribute description constraint for renameAttribute().
matthew

committed 8000 to opendj

16 May
Fix Proxy example to use authenticated connections for proxied operations.
matthew

resolved OPENDJ-500, OPENDJ-499

16 May
matthew

committed 7996 to opendj

16 May
Fix OPENDJ-500: Upgrade trunk (2.5.0) to JE 5.0.48
matthew

committed 7995 to opendj

16 May
Fix OPENDJ-499: Upgrade 2.4.x branch to JE 4.1.20
matthew

created OPENDJ-500, OPENDJ-499

16 May
matthew

resolved OPENDJ-497

15 May
matthew

created OPENDJ-497

15 May
matthew

resolved OPENDJ-496

15 May
matthew

committed 7990 to opendj

15 May
matthew

created OPENDJ-496

15 May
matthew

committed 7989 to opendj

15 May
matthew

resolved OPENDJ-495

15 May
matthew

created OPENDJ-495

15 May
matthew

commented on OPENDJ-443

15 May

I think that the suggested return codes in the issue are fine. However, I should warn you that I think, once again, this issue will be non-trivial to fix. From what I remember there are many places where exceptions are caught and the return code generated.

Start by looking at these methods:

org.opends.server.tools.dsconfig.DSConfig.main(String[], boolean, OutputStream, OutputStream)
org.opends.server.tools.dsconfig.DSConfig.run(String[])
org.opends.server.tools.dsconfig.DSConfig.runSubCommand(SubCommandHandler)

Of particular interest is this method and its call hierarchy (see how it creates a ClientException with a specific LDAP error code which is then ignored by upper layers):

org.opends.server.tools.dsconfig.LDAPManagementContextFactory.getManagementContext(ConsoleApplication, LDAPConnectionConsoleInteraction)

We could return the LDAP error codes. However, we decided that this would be too fine-grained and sometimes misleading.

One additional error code we might want to isolate is where the targeted managed object does not exist. For example, attempts to delete a non-existent backend, or get/set the properties of it, or even an attempt to add a new backend index when the parent backend does not exist. This sort of thing can occur frequently in non-interactive mode when the user mistypes the component name.

matthew

committed 7979 to opendj

11 May
Fix OPENDJ-482: Validation for the CertificateSyntax

A huge thanks to Manuel Gaupp for this contribution.

In addition to the original contributed change I have made the following alterations:

* make the CertificateSyntax strictness configurable. By default the syntax will enforce the syntax, but this can be disabled if needed

* add a new method "isHumanReadable" to AttributeSyntax and AttributeType classes in order to make it easier to determine whether or not a syntax/type is human readable. This can be used in order to determine whether or not an attribute value can be included in log messages, for example.
matthew

resolved OPENDJ-482

11 May

In addition to the original contributed change I have made the following alterations:

  • make the CertificateSyntax strictness configurable. By default the syntax will enforce the syntax, but this can be disabled if needed
  • add a new method "isHumanReadable" to AttributeSyntax and AttributeType classes in order to make it easier to determine whether or not a syntax/type is human readable. This can be used in order to determine whether or not an attribute value can be included in log messages, for example.

Thanks again for the great contribution.

matthew

Hi Laszlo,

As requested in your recent email, I thought that I'd take a look at your patch. I have a couple of general comments in addition to Andi's comments:

  1. Have you benchmarked and profiled the existing object pool implementation? Use of the "synchronized" keyword does not imply that a class will perform badly. An application's maximum theoretical throughput is dictated by the size of the largest common critical section. I'd be surprised if the existing object pool implementation is that bad. As they say: don't fix something unless it's known to be broken. I think Andi's comment above is hinting at this too - basically we're saying "beware of premature optimization". As a side note, the OpenDJ SDK's connection pool implementation uses very small synchronized blocks to manage the internal pool state, with care taken to perform anything that may potentially take a long time outside of the critical sections - it performs perfectly well for our needs (although it's been a while since I last stress tested it).
  2. If profiling has shown that the object pool implementation is a significant source of application contention then you may want to take a look at the sample ObjectPool class that I've attached (a simplified example of what you're trying to do with monitoring and eviction capabilities removed). When I looked at yours I became a little a confused over its use of a LinkedBlockingQueue (LBQ) and a Semaphore. In particular, decisions as to whether to allocate new objects or not seem to be based on a non-atomic check of the LBQ size and semaphore acquisition. I think that this is unnecessary: if the Semaphore is used to measure the total number of available objects (including those already allocated and in use or idle, and those which have not yet been allocated), then a successful acquisition of the semaphore indicates that you can obtain an object from somewhere. In other words, if there is nothing in the queue then allocate one instead. The side effect of this is that you don't need to use an LBQ, since the blocking and bounded size capabilities are not needed: instead you can use a more efficient non-blocking and unbounded ConcurrentLinkedQueue (CLQ).
  3. I think that you are right to require an explicit release of a pooled object. You may want to consider implementing Closeable in ObjectPoolEntry so that people can take advantage of try-with-resource in JDK7. I had thought about using SoftReferences and a ReferenceQueue to automatically capture leaked unreleased pooled objects but this will only be performed during a GC which won't prevent potential deadlocks. I think that it is better to fail fast rather tha try to hide memory leaks.