815a836ed89f450f9949d1a40bb99ec3e7889e2e |
|
27-Oct-2015 |
Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com> |
OPENDJ-2297 OpenDJ 2.x -> 3.0 upgrade fails when there are VLV indexes
JE serializes comparators inside the JE environment.
After upgrade from local-db to pluggable JE backend, we want to remove nearly all databases created with the local-db-backend.
In order to do this, we first need to open the environment and delete databases.
On opening the environment, JE tries to deserialize the comparators.
This fails because the classes in opendj-legacy are not serialization-compatible with the previous classes in opendj-server-legacy.
There were 2 issues that prevented serialization-compatibility:
- *OrderingMatchingRule classes had to implement Serializable
- *OrderingMatchingRule classes were missing the same values for serialVersionUID fields
This fix was successfully tested with a VLV index with the following search filter:
"(&(uid>=user.*)(photo>=*)(numSubordinates<=1)(entryUUID>=*)(modifyTimestamp>=0)(etag>=*)(internationaliSDNNumber>=*))"
This tests the following ordering matches:
"caseIgnoreMatch octetStringMatch integerOrderingMatch uuidOrderingMatch generalizedTimeOrderingMatch caseExactMatch"
Which tests the following ordering matching rule implementations:
"CaseIgnoreOrderingMatchingRule OctetStringOrderingMatchingRule IntegerOrderingMatchingRule UUIDOrderingMatchingRule GeneralizedTimeOrderingMatchingRule CaseExactOrderingMatchingRule NumericStringOrderingMatchingRule"
I am only missing HistoricalCsnOrderingMatchingRule
Note:
When removing the local-db-backend, we will have to move the VLV comparator to the opendj-legacy module.
We can remove all methods, but we will need to retain the serialVersionUID and possibly some fields (to be tested).
*OrderingMatchingRule.java:
Added back serialVersionUID fields.
DummyByteArrayComparator.java:
Implemented Serializable, so all *OrderingMatchingRule classes also do
VLVKeyComparator.java:
During deserialization a NPE was thrown. |