Search in sources :

Example 1 with IndexAccessors

use of org.neo4j.consistency.checking.index.IndexAccessors in project neo4j by neo4j.

the class FullCheck method execute.

void execute(final DirectStoreAccess directStoreAccess, final CheckDecorator decorator, final RecordAccess recordAccess, final InconsistencyReport report, CacheAccess cacheAccess, Monitor reportMonitor) throws ConsistencyCheckIncompleteException {
    final ConsistencyReporter reporter = new ConsistencyReporter(recordAccess, report, reportMonitor);
    StoreProcessor processEverything = new StoreProcessor(decorator, reporter, Stage.SEQUENTIAL_FORWARD, cacheAccess);
    ProgressMonitorFactory.MultiPartBuilder progress = progressFactory.multipleParts("Full Consistency Check");
    final StoreAccess nativeStores = directStoreAccess.nativeStores();
    try (IndexAccessors indexes = new IndexAccessors(directStoreAccess.indexes(), nativeStores.getSchemaStore(), samplingConfig)) {
        MultiPassStore.Factory multiPass = new MultiPassStore.Factory(decorator, recordAccess, cacheAccess, report, reportMonitor);
        ConsistencyCheckTasks taskCreator = new ConsistencyCheckTasks(progress, processEverything, nativeStores, statistics, cacheAccess, directStoreAccess.labelScanStore(), indexes, multiPass, reporter, threads);
        List<ConsistencyCheckerTask> tasks = taskCreator.createTasksForFullCheck(checkLabelScanStore, checkIndexes, checkGraph);
        TaskExecutor.execute(tasks, decorator::prepare);
    } catch (Exception e) {
        throw new ConsistencyCheckIncompleteException(e);
    }
}
Also used : IndexAccessors(org.neo4j.consistency.checking.index.IndexAccessors) DirectStoreAccess(org.neo4j.kernel.api.direct.DirectStoreAccess) StoreAccess(org.neo4j.kernel.impl.store.StoreAccess) ConsistencyReporter(org.neo4j.consistency.report.ConsistencyReporter) ProgressMonitorFactory(org.neo4j.helpers.progress.ProgressMonitorFactory) ProgressMonitorFactory(org.neo4j.helpers.progress.ProgressMonitorFactory)

Aggregations

IndexAccessors (org.neo4j.consistency.checking.index.IndexAccessors)1 ConsistencyReporter (org.neo4j.consistency.report.ConsistencyReporter)1 ProgressMonitorFactory (org.neo4j.helpers.progress.ProgressMonitorFactory)1 DirectStoreAccess (org.neo4j.kernel.api.direct.DirectStoreAccess)1 StoreAccess (org.neo4j.kernel.impl.store.StoreAccess)1