mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
28.14.2015 015860846ba771392700f962e38953ab320e0387
refs
author Matthew Swift <matthew.swift@forgerock.com>
Wednesday, October 28, 2015 13:14 +0100
committer Matthew Swift <matthew.swift@forgerock.com>
Wednesday, October 28, 2015 14:47 +0100
commit015860846ba771392700f962e38953ab320e0387
tree 3c1b04f2bab73c670f81f0854f26518d4a38a955 tree | zip | gz
parent 62cb6b2d67cb398b7bf763a5a23bc6cfddd740ba view | diff
OPENDJ-2328: Optimize UUID equality matching rule indexing

Made the following changes:

* removed duplicate normalization code between the ordering and equality
matching rules

* changed normalization algorithm to normalize values as 16 byte values
rather than 36 byte strings

* changed equality matching rule indexer to hash normalized values down
to 4 bytes and changed the ordering matching rule so that it no longer
reuses the equality matching rule index (this is ok because UUID
attributes are not normally indexed for ordering).

Benefits:

* 6% (30MB) reduction in disk/cache space for 1M entries
* small but significant boost in performance.

Key collisions:

* 1M entries had 101 key collisions (0.01%)
* 10M entries had 10000 key collisions (0.1%) of which only 7 mapped to
3 entries, the rest only mapped to 2.
3 files modified
283 ■■■■■ changed files
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/UUIDEqualityMatchingRuleImpl.java 189 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/UUIDOrderingMatchingRuleImpl.java 92 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/DNTestCase.java 2 ●●● diff | view | raw | blame | history