| | |
| | | state.open(txn, shouldCreate); |
| | | dn2uri.open(txn, shouldCreate); |
| | | |
| | | final boolean isNotEmpty = !isEmpty(txn); |
| | | for (String idx : config.listBackendIndexes()) |
| | | { |
| | | BackendIndexCfg indexCfg = config.getBackendIndex(idx); |
| | |
| | | CryptoSuite cryptoSuite = newCryptoSuite(indexCfg.isConfidentialityEnabled()); |
| | | final AttributeIndex index = newAttributeIndex(indexCfg, cryptoSuite); |
| | | index.open(txn, shouldCreate); |
| | | if(!index.isTrusted()) |
| | | if(!index.isTrusted() && isNotEmpty) |
| | | { |
| | | logger.info(NOTE_INDEX_ADD_REQUIRES_REBUILD, index.getName()); |
| | | } |
| | |
| | | |
| | | VLVIndex vlvIndex = new VLVIndex(vlvIndexCfg, state, storage, this, txn); |
| | | vlvIndex.open(txn, shouldCreate); |
| | | if(!vlvIndex.isTrusted()) |
| | | if(!vlvIndex.isTrusted() && isNotEmpty) |
| | | { |
| | | logger.info(NOTE_INDEX_ADD_REQUIRES_REBUILD, vlvIndex.getName()); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | boolean isEmpty(ReadableTransaction txn) |
| | | { |
| | | return getHighestEntryID(txn).longValue() == 0; |
| | | } |
| | | |
| | | /** |
| | | * Closes the entry container. |
| | | * |