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

Fabio Pistolesi
09.37.2015 65c4b9f6eef396deec7aa3f0c335f9ef1b9099ce
refs
author Fabio Pistolesi <fabio.pistolesi@forgerock.com>
Thursday, July 9, 2015 18:37 +0200
committer Fabio Pistolesi <fabio.pistolesi@forgerock.com>
Thursday, July 9, 2015 18:37 +0200
commit65c4b9f6eef396deec7aa3f0c335f9ef1b9099ce
tree a83c71fa9701e4ccf98060d15d53e821bbaade32 tree | zip | gz
parent cd12a61e138344e079c94337f75d32664ea4486c view | diff
OPENDJ-2171 CR-7414 import-ldif in append mode should not reset index state

Regardless of options specified to import-ldif, all indexes are systematically set as not trusted before importing and reset to trusted once it's finished.
On the other hand if the suffix is simply appended to, indexes not up to date with the data should not be set to trusted, since they may end up with partial data.

Before import we should set all trusted indexes as candidates for updates, but leave not trusted indexes alone.
In order to do that, use index lists from Suffix, building the list of indexes to update taking into account the append flag: if it is specified only consider trusted indexes.
Import code should only get index information from the Suffix.

Rebuild index should still be based on the EntryContainer though, since we are managing indexes directly.
8 files modified
374 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/EntryContainer.java 9 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/Importer.java 104 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/Suffix.java 131 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java 10 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/OnDiskMergeBufferImporter.java 49 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/OnDiskMergeStorageImporter.java 14 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Suffix.java 53 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/messages/org/opends/messages/backend.properties 4 ●●● diff | view | raw | blame | history