OPENDJ-2574 Error about read-only storage after creating a VLV index with some offline tasks.
VLV indexes need to open the counter Tree with the correct accessMode for the entry container.
| | |
| | | public final void open(WriteableTransaction txn, boolean createOnDemand) throws StorageRuntimeException |
| | | { |
| | | txn.openTree(name, createOnDemand); |
| | | afterOpen(txn); |
| | | afterOpen(txn, createOnDemand); |
| | | } |
| | | |
| | | /** Override in order to perform any additional initialization after the index has opened. */ |
| | | void afterOpen(WriteableTransaction txn) throws StorageRuntimeException |
| | | void afterOpen(WriteableTransaction txn, boolean createOnDemand) throws StorageRuntimeException |
| | | { |
| | | // Do nothing by default. |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | final void afterOpen(WriteableTransaction txn) |
| | | final void afterOpen(WriteableTransaction txn, boolean createOnDemand) |
| | | { |
| | | final EnumSet<IndexFlag> flags = state.getIndexFlags(txn, getName()); |
| | | codec = flags.contains(COMPACTED) ? CODEC_V2 : CODEC_V1; |
| | |
| | | } |
| | | |
| | | @Override |
| | | void afterOpen(WriteableTransaction txn) throws StorageRuntimeException |
| | | void afterOpen(WriteableTransaction txn, boolean createOnDemand) throws StorageRuntimeException |
| | | { |
| | | // Make sure the tree is there and readable, even if the storage is READ_ONLY. |
| | | // Would be nice if there were a better way... |
| | |
| | | } |
| | | |
| | | @Override |
| | | void afterOpen(final WriteableTransaction txn) throws StorageRuntimeException |
| | | void afterOpen(final WriteableTransaction txn, boolean createOnDemand) throws StorageRuntimeException |
| | | { |
| | | counter.open(txn, true); |
| | | counter.open(txn, createOnDemand); |
| | | } |
| | | |
| | | @Override |