Search in sources :

Example 1 with MutableLongObjectMap

use of org.eclipse.collections.api.map.primitive.MutableLongObjectMap in project neo4j by neo4j.

the class IndexingService method populateIndexesOfAllTypes.

private void populateIndexesOfAllTypes(MutableLongObjectMap<IndexDescriptor> rebuildingDescriptors, IndexMap indexMap) {
    Map<EntityType, MutableLongObjectMap<IndexDescriptor>> rebuildingDescriptorsByType = new EnumMap<>(EntityType.class);
    for (IndexDescriptor descriptor : rebuildingDescriptors) {
        rebuildingDescriptorsByType.computeIfAbsent(descriptor.schema().entityType(), type -> new LongObjectHashMap<>()).put(descriptor.getId(), descriptor);
    }
    for (Map.Entry<EntityType, MutableLongObjectMap<IndexDescriptor>> descriptorToPopulate : rebuildingDescriptorsByType.entrySet()) {
        IndexPopulationJob populationJob = newIndexPopulationJob(descriptorToPopulate.getKey(), false, SYSTEM);
        populate(descriptorToPopulate.getValue(), indexMap, populationJob);
    }
}
Also used : EntityType(org.neo4j.common.EntityType) LifecycleAdapter(org.neo4j.kernel.lifecycle.LifecycleAdapter) Arrays(java.util.Arrays) ResourceIterator(org.neo4j.graphdb.ResourceIterator) Log(org.neo4j.logging.Log) CursorContext(org.neo4j.io.pagecache.context.CursorContext) TokenNameLookup(org.neo4j.common.TokenNameLookup) IndexPopulator(org.neo4j.kernel.api.index.IndexPopulator) LongObjectProcedure(org.eclipse.collections.api.block.procedure.primitive.LongObjectProcedure) UnaryOperator(java.util.function.UnaryOperator) Config(org.neo4j.configuration.Config) Value(org.neo4j.values.storable.Value) Preconditions(org.neo4j.util.Preconditions) IndexStatisticsStore(org.neo4j.kernel.impl.api.index.stats.IndexStatisticsStore) UnderlyingStorageException(org.neo4j.exceptions.UnderlyingStorageException) IndexUpdater(org.neo4j.kernel.api.index.IndexUpdater) IndexNotFoundKernelException(org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException) IndexPopulationFailedKernelException(org.neo4j.kernel.api.exceptions.index.IndexPopulationFailedKernelException) LongHashSet(org.eclipse.collections.impl.set.mutable.primitive.LongHashSet) Map(java.util.Map) LongIterable(org.eclipse.collections.api.LongIterable) PageCacheTracer(org.neo4j.io.pagecache.tracing.PageCacheTracer) IndexProviderDescriptor(org.neo4j.internal.schema.IndexProviderDescriptor) Path(java.nio.file.Path) EnumMap(java.util.EnumMap) SYSTEM(org.neo4j.common.Subject.SYSTEM) Collection(java.util.Collection) Set(java.util.Set) IndexEntryUpdate(org.neo4j.storageengine.api.IndexEntryUpdate) Collectors(java.util.stream.Collectors) String.format(java.lang.String.format) UncheckedIOException(java.io.UncheckedIOException) List(java.util.List) EntityType(org.neo4j.common.EntityType) IndexPrototype(org.neo4j.internal.schema.IndexPrototype) FAILED(org.neo4j.internal.kernel.api.InternalIndexState.FAILED) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) MutableBoolean(org.apache.commons.lang3.mutable.MutableBoolean) DatabaseReadOnlyChecker(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker) NODE(org.neo4j.common.EntityType.NODE) Iterators.asResourceIterator(org.neo4j.internal.helpers.collection.Iterators.asResourceIterator) GraphDatabaseSettings(org.neo4j.configuration.GraphDatabaseSettings) InternalIndexState(org.neo4j.internal.kernel.api.InternalIndexState) IndexSamplingController(org.neo4j.kernel.impl.api.index.sampling.IndexSamplingController) LogProvider(org.neo4j.logging.LogProvider) HashMap(java.util.HashMap) MutableLongObjectMap(org.eclipse.collections.api.map.primitive.MutableLongObjectMap) Iterators.iterator(org.neo4j.internal.helpers.collection.Iterators.iterator) IndexProvider(org.neo4j.kernel.api.index.IndexProvider) ArrayList(java.util.ArrayList) IndexEntryConflictException(org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException) LongObjectHashMap(org.eclipse.collections.impl.map.mutable.primitive.LongObjectHashMap) ThrowingConsumer(org.neo4j.function.ThrowingConsumer) POPULATING(org.neo4j.internal.kernel.api.InternalIndexState.POPULATING) IndexPopulationFailure.failure(org.neo4j.kernel.impl.api.index.IndexPopulationFailure.failure) ONLINE(org.neo4j.internal.kernel.api.InternalIndexState.ONLINE) IndexStoreViewFactory(org.neo4j.kernel.impl.transaction.state.storeview.IndexStoreViewFactory) JobScheduler(org.neo4j.scheduler.JobScheduler) MemoryTracker(org.neo4j.memory.MemoryTracker) NodePropertyAccessor(org.neo4j.storageengine.api.NodePropertyAccessor) IndexUpdateListener(org.neo4j.storageengine.api.IndexUpdateListener) Subject(org.neo4j.common.Subject) Iterators(org.neo4j.internal.helpers.collection.Iterators) IndexSamplingMode(org.neo4j.kernel.impl.api.index.sampling.IndexSamplingMode) Iterables.asList(org.neo4j.internal.helpers.collection.Iterables.asList) IOException(java.io.IOException) IndexActivationFailedKernelException(org.neo4j.kernel.api.exceptions.index.IndexActivationFailedKernelException) RELATIONSHIP(org.neo4j.common.EntityType.RELATIONSHIP) MutableLongSet(org.eclipse.collections.api.set.primitive.MutableLongSet) TimeUnit(java.util.concurrent.TimeUnit) KernelException(org.neo4j.exceptions.KernelException) StringJoiner(java.util.StringJoiner) UniquePropertyValueValidationException(org.neo4j.kernel.api.exceptions.schema.UniquePropertyValueValidationException) SchemaState(org.neo4j.internal.schema.SchemaState) LongSet(org.eclipse.collections.api.set.primitive.LongSet) LongObjectHashMap(org.eclipse.collections.impl.map.mutable.primitive.LongObjectHashMap) MutableLongObjectMap(org.eclipse.collections.api.map.primitive.MutableLongObjectMap) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) EnumMap(java.util.EnumMap) Map(java.util.Map) EnumMap(java.util.EnumMap) HashMap(java.util.HashMap) MutableLongObjectMap(org.eclipse.collections.api.map.primitive.MutableLongObjectMap) LongObjectHashMap(org.eclipse.collections.impl.map.mutable.primitive.LongObjectHashMap)

Example 2 with MutableLongObjectMap

use of org.eclipse.collections.api.map.primitive.MutableLongObjectMap in project neo4j by neo4j.

the class RelationshipModifier method acquireMostOfTheNodeAndGroupsLocks.

private void acquireMostOfTheNodeAndGroupsLocks(RelationshipModifications modifications, RecordAccessSet recordChanges, ResourceLocker locks, LockTracer lockTracer, MutableLongObjectMap<NodeContext> contexts, MappedNodeDataLookup nodeDataLookup) {
    /* Here we're going to figure out if we need to make changes to any node and/or relationship group records and lock them if we do. */
    // We check modifications for each node, it might need locking. The iteration here is always sorted by node id
    modifications.forEachSplit(byNode -> {
        long nodeId = byNode.nodeId();
        RecordProxy<NodeRecord, Void> nodeProxy = recordChanges.getNodeRecords().getOrLoad(nodeId, null, cursorContext);
        // optimistic (unlocked) read
        NodeRecord node = nodeProxy.forReadingLinkage();
        boolean nodeIsAddedInTx = node.isCreated();
        if (// we can not trust this as the node is not locked
        !node.isDense()) {
            if (// to avoid locking unnecessarily
            !nodeIsAddedInTx) {
                // lock and re-read, now we can trust it
                locks.acquireExclusive(lockTracer, NODE, nodeId);
                nodeProxy = recordChanges.getNodeRecords().getOrLoad(nodeId, null, cursorContext);
                node = nodeProxy.forReadingLinkage();
                if (node.isDense()) {
                    // another transaction just turned this node dense, unlock and let it be handled below
                    locks.releaseExclusive(NODE, nodeId);
                } else if (byNode.hasCreations()) {
                    // Sparse node with added relationships. We might turn this node dense, at which point the group lock will be needed, so lock it
                    locks.acquireExclusive(lockTracer, RELATIONSHIP_GROUP, nodeId);
                }
            }
        }
        if (// the node is not locked but the dense node is a one-way transform so we can trust it
        node.isDense()) {
            // Stabilize first in chains, in case they are deleted or needed for chain degrees.
            // We are preventing any changes to the group which in turn blocks any other relationship becomming the first in chain
            locks.acquireShared(lockTracer, RELATIONSHIP_GROUP, nodeId);
            // Creations
            NodeContext nodeContext = NodeContext.createNodeContext(nodeProxy, memoryTracker);
            contexts.put(nodeId, nodeContext);
            if (byNode.hasCreations()) {
                // We have some creations on a dense node. If the group exists we can use that, otherwise we create it
                byNode.forEachCreationSplit(byType -> {
                    RelationshipGroupGetter.RelationshipGroupPosition groupPosition = findRelationshipGroup(recordChanges, nodeContext, byType);
                    nodeContext.setCurrentGroup(groupPosition.group() != null ? groupPosition.group() : groupPosition.closestPrevious());
                    RecordProxy<RelationshipGroupRecord, Integer> groupProxy = groupPosition.group();
                    if (groupProxy == null) {
                        // The group did not exist
                        if (!nodeContext.hasExclusiveGroupLock()) {
                            // And we did not already have the lock, so we need to upgrade to exclusive create it
                            locks.releaseShared(RELATIONSHIP_GROUP, nodeId);
                            // Note the small window here where we dont hold any group lock, things might change so we can not trust previous group reads
                            locks.acquireExclusive(lockTracer, NODE, nodeId);
                            locks.acquireExclusive(lockTracer, RELATIONSHIP_GROUP, nodeId);
                        }
                        nodeContext.setNode(recordChanges.getNodeRecords().getOrLoad(nodeId, null, cursorContext));
                        long groupStartingId = nodeContext.node().forReadingLinkage().getNextRel();
                        long groupStartingPrevId = NULL_REFERENCE.longValue();
                        if (groupPosition.closestPrevious() != null) {
                            groupStartingId = groupPosition.closestPrevious().getKey();
                            groupStartingPrevId = groupPosition.closestPrevious().forReadingLinkage().getPrev();
                        }
                        // At this point the group is locked so we can create it
                        groupProxy = relGroupGetter.getOrCreateRelationshipGroup(nodeContext.node(), byType.type(), recordChanges.getRelGroupRecords(), groupStartingPrevId, groupStartingId);
                        // another transaction might beat us at this point, so we are not guaranteed to be the creator but we can trust it to exist
                        if (!nodeContext.hasExclusiveGroupLock()) {
                            nodeContext.markExclusiveGroupLock();
                        } else if (groupProxy.isCreated()) {
                            // When a new group is created we can no longer trust the pointers of the cache
                            nodeContext.clearDenseContext();
                        }
                    }
                    nodeContext.denseContext(byType.type()).setGroup(groupProxy);
                });
                if (!nodeContext.hasExclusiveGroupLock()) {
                    // No other path has given us the exclusive lock yet
                    byNode.forEachCreationSplitInterruptible(byType -> {
                        // But if we are creating relationships to a chain that does not exist on the group
                        // or we might need to flip the external degrees flag
                        RelationshipGroupRecord group = nodeContext.denseContext(byType.type()).group().forReadingLinkage();
                        if (byType.hasOut() && (!group.hasExternalDegreesOut() || isNull(group.getFirstOut())) || byType.hasIn() && (!group.hasExternalDegreesIn() || isNull(group.getFirstIn())) || byType.hasLoop() && (!group.hasExternalDegreesLoop() || isNull(group.getFirstLoop()))) {
                            // Then we need the exclusive lock to change it
                            locks.releaseShared(RELATIONSHIP_GROUP, nodeId);
                            // Note the small window here where we dont hold any group lock, things might change so we can not trust previous group reads
                            locks.acquireExclusive(lockTracer, RELATIONSHIP_GROUP, nodeId);
                            nodeContext.markExclusiveGroupLock();
                            // And we can abort the iteration as the group lock is protecting all relationship group records of the node
                            return true;
                        }
                        return false;
                    });
                }
            }
            // Deletions
            if (byNode.hasDeletions()) {
                if (// no need to do anything if it is already locked by additions
                !nodeContext.hasExclusiveGroupLock()) {
                    byNode.forEachDeletionSplitInterruptible(byType -> {
                        NodeContext.DenseContext denseContext = nodeContext.denseContext(byType.type());
                        RelationshipGroupRecord group = denseContext.getOrLoadGroup(relGroupGetter, nodeContext.node().forReadingLinkage(), byType.type(), recordChanges.getRelGroupRecords(), cursorContext);
                        // here we have the shared lock, so we can trust the read
                        if (byType.hasOut() && !group.hasExternalDegreesOut() || byType.hasIn() && !group.hasExternalDegreesIn() || byType.hasLoop() && !group.hasExternalDegreesLoop()) {
                            // We have deletions but without external degrees, we might need to flip that so we lock it
                            locks.releaseShared(RELATIONSHIP_GROUP, nodeId);
                            // Note the small window here where we dont hold any group lock, things might change so we can not trust previous group reads
                            locks.acquireExclusive(lockTracer, RELATIONSHIP_GROUP, nodeId);
                            nodeContext.markExclusiveGroupLock();
                            return true;
                        } else {
                            // We have deletions and only external degrees
                            boolean hasAnyFirst = batchContains(byType.out(), group.getFirstOut()) || batchContains(byType.in(), group.getFirstIn()) || batchContains(byType.loop(), group.getFirstLoop());
                            if (hasAnyFirst) {
                                // But we're deleting the first in the chain so the group needs to be updated
                                locks.releaseShared(RELATIONSHIP_GROUP, nodeId);
                                // Note the small window here where we dont hold any group lock, things might change so we can not trust previous group reads
                                locks.acquireExclusive(lockTracer, RELATIONSHIP_GROUP, nodeId);
                                nodeContext.markExclusiveGroupLock();
                                return true;
                            }
                        }
                        return false;
                    });
                }
            }
            // Look for an opportunity to delete empty groups that we noticed while looking for groups above
            if (nodeContext.hasExclusiveGroupLock() && nodeContext.hasAnyEmptyGroup()) {
                // There may be one or more empty groups that we can delete
                if (locks.tryExclusiveLock(NODE_RELATIONSHIP_GROUP_DELETE, nodeId)) {
                    // We got the EXCLUSIVE group lock so we can go ahead and try to remove any potentially empty groups
                    if (!nodeContext.hasEmptyFirstGroup() || locks.tryExclusiveLock(NODE, nodeId)) {
                        if (nodeContext.hasEmptyFirstGroup()) {
                            // It's possible that we need to delete the first group, i.e. we just now locked the node and therefore need to re-read it
                            nodeContext.setNode(recordChanges.getNodeRecords().getOrLoad(nodeId, null, cursorContext));
                        }
                        Predicate<RelationshipGroupRecord> canDeleteGroup = group -> !byNode.hasCreations(group.getType());
                        if (RelationshipGroupGetter.deleteEmptyGroups(nodeContext.node(), canDeleteGroup, nodeDataLookup)) {
                            nodeContext.clearDenseContext();
                        }
                    }
                }
            }
        }
    });
}
Also used : RelationshipModifications(org.neo4j.storageengine.api.txstate.RelationshipModifications) RelationshipLockHelper.findAndLockInsertionPoint(org.neo4j.internal.recordstorage.RelationshipLockHelper.findAndLockInsertionPoint) Record.isNull(org.neo4j.kernel.impl.store.record.Record.isNull) HeapTrackingCollections.newLongObjectMap(org.neo4j.collection.trackable.HeapTrackingCollections.newLongObjectMap) RelationshipCreator.relCount(org.neo4j.internal.recordstorage.RelationshipCreator.relCount) CursorContext(org.neo4j.io.pagecache.context.CursorContext) LongLists(org.eclipse.collections.impl.factory.primitive.LongLists) MutableLongObjectMap(org.eclipse.collections.api.map.primitive.MutableLongObjectMap) MutableLongList(org.eclipse.collections.api.list.primitive.MutableLongList) DIR_OUT(org.neo4j.internal.recordstorage.RelationshipCreator.NodeDataLookup.DIR_OUT) RelationshipLockHelper.lockRelationshipsInOrder(org.neo4j.internal.recordstorage.RelationshipLockHelper.lockRelationshipsInOrder) NODE_RELATIONSHIP_GROUP_DELETE(org.neo4j.lock.ResourceTypes.NODE_RELATIONSHIP_GROUP_DELETE) MemoryTracker(org.neo4j.memory.MemoryTracker) RELATIONSHIP_GROUP(org.neo4j.lock.ResourceTypes.RELATIONSHIP_GROUP) RELATIONSHIP(org.neo4j.lock.ResourceTypes.RELATIONSHIP) LockTracer(org.neo4j.lock.LockTracer) RelationshipGroupDegreesStore(org.neo4j.internal.counts.RelationshipGroupDegreesStore) Predicate(java.util.function.Predicate) NULL_REFERENCE(org.neo4j.kernel.impl.store.record.Record.NULL_REFERENCE) RelationshipBatch(org.neo4j.storageengine.api.txstate.RelationshipModifications.RelationshipBatch) ResourceLocker(org.neo4j.lock.ResourceLocker) DIR_IN(org.neo4j.internal.recordstorage.RelationshipCreator.NodeDataLookup.DIR_IN) DIR_LOOP(org.neo4j.internal.recordstorage.RelationshipCreator.NodeDataLookup.DIR_LOOP) RelationshipGroupRecord(org.neo4j.kernel.impl.store.record.RelationshipGroupRecord) HeapTrackingLongObjectHashMap(org.neo4j.collection.trackable.HeapTrackingLongObjectHashMap) NodeRecord(org.neo4j.kernel.impl.store.record.NodeRecord) ALWAYS(org.neo4j.kernel.impl.store.record.RecordLoad.ALWAYS) NODE(org.neo4j.lock.ResourceTypes.NODE) RelationshipRecord(org.neo4j.kernel.impl.store.record.RelationshipRecord) RecordProxy(org.neo4j.internal.recordstorage.RecordAccess.RecordProxy) RelationshipGroupRecord(org.neo4j.kernel.impl.store.record.RelationshipGroupRecord) NodeRecord(org.neo4j.kernel.impl.store.record.NodeRecord)

Example 3 with MutableLongObjectMap

use of org.eclipse.collections.api.map.primitive.MutableLongObjectMap in project neo4j by neo4j.

the class IndexingService method start.

// Recovery semantics: This is to be called after init, and after the database has run recovery.
@Override
public void start() throws Exception {
    state = State.STARTING;
    // Recovery will not do refresh (update read views) while applying recovered transactions and instead
    // do it at one point after recovery... i.e. here
    indexMapRef.indexMapSnapshot().forEachIndexProxy(indexProxyOperation("refresh", IndexProxy::refresh));
    final MutableLongObjectMap<IndexDescriptor> rebuildingDescriptors = new LongObjectHashMap<>();
    indexMapRef.modify(indexMap -> {
        Map<InternalIndexState, List<IndexLogRecord>> indexStates = new EnumMap<>(InternalIndexState.class);
        Map<IndexProviderDescriptor, List<IndexLogRecord>> indexProviders = new HashMap<>();
        // Find all indexes that are not already online, do not require rebuilding, and create them
        indexMap.forEachIndexProxy((indexId, proxy) -> {
            InternalIndexState state = proxy.getState();
            IndexDescriptor descriptor = proxy.getDescriptor();
            IndexProviderDescriptor providerDescriptor = descriptor.getIndexProvider();
            IndexLogRecord indexLogRecord = new IndexLogRecord(descriptor);
            indexStates.computeIfAbsent(state, internalIndexState -> new ArrayList<>()).add(indexLogRecord);
            indexProviders.computeIfAbsent(providerDescriptor, indexProviderDescriptor -> new ArrayList<>()).add(indexLogRecord);
            internalLog.debug(indexStateInfo("start", state, descriptor));
            switch(state) {
                case ONLINE:
                case FAILED:
                    proxy.start();
                    break;
                case POPULATING:
                    // Remember for rebuilding right below in this method
                    rebuildingDescriptors.put(indexId, descriptor);
                    break;
                default:
                    throw new IllegalStateException("Unknown state: " + state);
            }
        });
        logIndexStateSummary("start", indexStates);
        logIndexProviderSummary(indexProviders);
        dontRebuildIndexesInReadOnlyMode(rebuildingDescriptors);
        // Drop placeholder proxies for indexes that need to be rebuilt
        dropRecoveringIndexes(indexMap, rebuildingDescriptors.keySet());
        // Rebuild indexes by recreating and repopulating them
        populateIndexesOfAllTypes(rebuildingDescriptors, indexMap);
        return indexMap;
    });
    indexStatisticsStore.start();
    samplingController.recoverIndexSamples();
    samplingController.start();
    // So at this point we've started population of indexes that needs to be rebuilt in the background.
    // Indexes backing uniqueness constraints are normally built within the transaction creating the constraint
    // and so we shouldn't leave such indexes in a populating state after recovery.
    // This is why we now go and wait for those indexes to be fully populated.
    rebuildingDescriptors.forEachKeyValue((indexId, index) -> {
        if (!index.isUnique()) {
            // It's not a uniqueness constraint, so don't wait for it to be rebuilt
            return;
        }
        IndexProxy proxy;
        try {
            proxy = getIndexProxy(index);
        } catch (IndexNotFoundKernelException e) {
            throw new IllegalStateException("What? This index was seen during recovery just now, why isn't it available now?", e);
        }
        if (proxy.getDescriptor().getOwningConstraintId().isEmpty()) {
            // so there's no gain in waiting for this index.
            return;
        }
        monitor.awaitingPopulationOfRecoveredIndex(index);
        awaitOnlineAfterRecovery(proxy);
    });
    state = State.RUNNING;
}
Also used : LifecycleAdapter(org.neo4j.kernel.lifecycle.LifecycleAdapter) Arrays(java.util.Arrays) ResourceIterator(org.neo4j.graphdb.ResourceIterator) Log(org.neo4j.logging.Log) CursorContext(org.neo4j.io.pagecache.context.CursorContext) TokenNameLookup(org.neo4j.common.TokenNameLookup) IndexPopulator(org.neo4j.kernel.api.index.IndexPopulator) LongObjectProcedure(org.eclipse.collections.api.block.procedure.primitive.LongObjectProcedure) UnaryOperator(java.util.function.UnaryOperator) Config(org.neo4j.configuration.Config) Value(org.neo4j.values.storable.Value) Preconditions(org.neo4j.util.Preconditions) IndexStatisticsStore(org.neo4j.kernel.impl.api.index.stats.IndexStatisticsStore) UnderlyingStorageException(org.neo4j.exceptions.UnderlyingStorageException) IndexUpdater(org.neo4j.kernel.api.index.IndexUpdater) IndexNotFoundKernelException(org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException) IndexPopulationFailedKernelException(org.neo4j.kernel.api.exceptions.index.IndexPopulationFailedKernelException) LongHashSet(org.eclipse.collections.impl.set.mutable.primitive.LongHashSet) Map(java.util.Map) LongIterable(org.eclipse.collections.api.LongIterable) PageCacheTracer(org.neo4j.io.pagecache.tracing.PageCacheTracer) IndexProviderDescriptor(org.neo4j.internal.schema.IndexProviderDescriptor) Path(java.nio.file.Path) EnumMap(java.util.EnumMap) SYSTEM(org.neo4j.common.Subject.SYSTEM) Collection(java.util.Collection) Set(java.util.Set) IndexEntryUpdate(org.neo4j.storageengine.api.IndexEntryUpdate) Collectors(java.util.stream.Collectors) String.format(java.lang.String.format) UncheckedIOException(java.io.UncheckedIOException) List(java.util.List) EntityType(org.neo4j.common.EntityType) IndexPrototype(org.neo4j.internal.schema.IndexPrototype) FAILED(org.neo4j.internal.kernel.api.InternalIndexState.FAILED) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) MutableBoolean(org.apache.commons.lang3.mutable.MutableBoolean) DatabaseReadOnlyChecker(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker) NODE(org.neo4j.common.EntityType.NODE) Iterators.asResourceIterator(org.neo4j.internal.helpers.collection.Iterators.asResourceIterator) GraphDatabaseSettings(org.neo4j.configuration.GraphDatabaseSettings) InternalIndexState(org.neo4j.internal.kernel.api.InternalIndexState) IndexSamplingController(org.neo4j.kernel.impl.api.index.sampling.IndexSamplingController) LogProvider(org.neo4j.logging.LogProvider) HashMap(java.util.HashMap) MutableLongObjectMap(org.eclipse.collections.api.map.primitive.MutableLongObjectMap) Iterators.iterator(org.neo4j.internal.helpers.collection.Iterators.iterator) IndexProvider(org.neo4j.kernel.api.index.IndexProvider) ArrayList(java.util.ArrayList) IndexEntryConflictException(org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException) LongObjectHashMap(org.eclipse.collections.impl.map.mutable.primitive.LongObjectHashMap) ThrowingConsumer(org.neo4j.function.ThrowingConsumer) POPULATING(org.neo4j.internal.kernel.api.InternalIndexState.POPULATING) IndexPopulationFailure.failure(org.neo4j.kernel.impl.api.index.IndexPopulationFailure.failure) ONLINE(org.neo4j.internal.kernel.api.InternalIndexState.ONLINE) IndexStoreViewFactory(org.neo4j.kernel.impl.transaction.state.storeview.IndexStoreViewFactory) JobScheduler(org.neo4j.scheduler.JobScheduler) MemoryTracker(org.neo4j.memory.MemoryTracker) NodePropertyAccessor(org.neo4j.storageengine.api.NodePropertyAccessor) IndexUpdateListener(org.neo4j.storageengine.api.IndexUpdateListener) Subject(org.neo4j.common.Subject) Iterators(org.neo4j.internal.helpers.collection.Iterators) IndexSamplingMode(org.neo4j.kernel.impl.api.index.sampling.IndexSamplingMode) Iterables.asList(org.neo4j.internal.helpers.collection.Iterables.asList) IOException(java.io.IOException) IndexActivationFailedKernelException(org.neo4j.kernel.api.exceptions.index.IndexActivationFailedKernelException) RELATIONSHIP(org.neo4j.common.EntityType.RELATIONSHIP) MutableLongSet(org.eclipse.collections.api.set.primitive.MutableLongSet) TimeUnit(java.util.concurrent.TimeUnit) KernelException(org.neo4j.exceptions.KernelException) StringJoiner(java.util.StringJoiner) UniquePropertyValueValidationException(org.neo4j.kernel.api.exceptions.schema.UniquePropertyValueValidationException) SchemaState(org.neo4j.internal.schema.SchemaState) LongSet(org.eclipse.collections.api.set.primitive.LongSet) LongObjectHashMap(org.eclipse.collections.impl.map.mutable.primitive.LongObjectHashMap) HashMap(java.util.HashMap) LongObjectHashMap(org.eclipse.collections.impl.map.mutable.primitive.LongObjectHashMap) IndexProviderDescriptor(org.neo4j.internal.schema.IndexProviderDescriptor) ArrayList(java.util.ArrayList) IndexNotFoundKernelException(org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) InternalIndexState(org.neo4j.internal.kernel.api.InternalIndexState) List(java.util.List) ArrayList(java.util.ArrayList) Iterables.asList(org.neo4j.internal.helpers.collection.Iterables.asList) EnumMap(java.util.EnumMap)

Aggregations

MutableLongObjectMap (org.eclipse.collections.api.map.primitive.MutableLongObjectMap)3 IOException (java.io.IOException)2 UncheckedIOException (java.io.UncheckedIOException)2 String.format (java.lang.String.format)2 Path (java.nio.file.Path)2 ArrayList (java.util.ArrayList)2 Arrays (java.util.Arrays)2 Collection (java.util.Collection)2 EnumMap (java.util.EnumMap)2 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 Set (java.util.Set)2 StringJoiner (java.util.StringJoiner)2 TimeUnit (java.util.concurrent.TimeUnit)2 UnaryOperator (java.util.function.UnaryOperator)2 Collectors (java.util.stream.Collectors)2 MutableBoolean (org.apache.commons.lang3.mutable.MutableBoolean)2 LongIterable (org.eclipse.collections.api.LongIterable)2 LongObjectProcedure (org.eclipse.collections.api.block.procedure.primitive.LongObjectProcedure)2