Search in sources :

Example 11 with DatabaseLayout

use of org.neo4j.io.layout.DatabaseLayout in project neo4j by neo4j.

the class BatchingNeoStoresTest method someDataInTheDatabase.

private void someDataInTheDatabase(Config config) throws Exception {
    NullLog nullLog = NullLog.getInstance();
    try (JobScheduler scheduler = JobSchedulerFactory.createInitialisedScheduler();
        PageCache pageCache = new ConfiguringPageCacheFactory(fileSystem, Config.defaults(), PageCacheTracer.NULL, nullLog, scheduler, Clocks.nanoClock(), new MemoryPools()).getOrCreatePageCache();
        Lifespan life = new Lifespan()) {
        // TODO this little dance with TokenHolders is really annoying and must be solved with a better abstraction
        DeferredInitializedTokenCreator propertyKeyTokenCreator = new DeferredInitializedTokenCreator() {

            @Override
            void create(String name, boolean internal, int id) {
                txState.propertyKeyDoCreateForName(name, internal, id);
            }
        };
        DeferredInitializedTokenCreator labelTokenCreator = new DeferredInitializedTokenCreator() {

            @Override
            void create(String name, boolean internal, int id) {
                txState.labelDoCreateForName(name, internal, id);
            }
        };
        DeferredInitializedTokenCreator relationshipTypeTokenCreator = new DeferredInitializedTokenCreator() {

            @Override
            void create(String name, boolean internal, int id) {
                txState.relationshipTypeDoCreateForName(name, internal, id);
            }
        };
        TokenHolders tokenHolders = new TokenHolders(new DelegatingTokenHolder(propertyKeyTokenCreator, TokenHolder.TYPE_PROPERTY_KEY), new DelegatingTokenHolder(labelTokenCreator, TokenHolder.TYPE_LABEL), new DelegatingTokenHolder(relationshipTypeTokenCreator, TokenHolder.TYPE_RELATIONSHIP_TYPE));
        IndexConfigCompleter indexConfigCompleter = index -> index;
        RecoveryCleanupWorkCollector recoveryCleanupWorkCollector = immediate();
        RecordStorageEngine storageEngine = life.add(new RecordStorageEngine(databaseLayout, Config.defaults(), pageCache, fileSystem, NullLogProvider.getInstance(), tokenHolders, new DatabaseSchemaState(NullLogProvider.getInstance()), new StandardConstraintSemantics(), indexConfigCompleter, LockService.NO_LOCK_SERVICE, new DatabaseHealth(PanicEventGenerator.NO_OP, nullLog), new DefaultIdGeneratorFactory(fileSystem, immediate(), DEFAULT_DATABASE_NAME), new DefaultIdController(), recoveryCleanupWorkCollector, PageCacheTracer.NULL, true, INSTANCE, writable(), CommandLockVerification.Factory.IGNORE, LockVerificationMonitor.Factory.IGNORE));
        // Create the relationship type token
        TxState txState = new TxState();
        NeoStores neoStores = storageEngine.testAccessNeoStores();
        CommandCreationContext commandCreationContext = storageEngine.newCommandCreationContext(INSTANCE);
        commandCreationContext.initialize(NULL);
        propertyKeyTokenCreator.initialize(neoStores.getPropertyKeyTokenStore(), txState);
        labelTokenCreator.initialize(neoStores.getLabelTokenStore(), txState);
        relationshipTypeTokenCreator.initialize(neoStores.getRelationshipTypeTokenStore(), txState);
        int relTypeId = tokenHolders.relationshipTypeTokens().getOrCreateId(RELTYPE.name());
        apply(txState, commandCreationContext, storageEngine);
        // Finally, we're initialized and ready to create two nodes and a relationship
        txState = new TxState();
        long node1 = commandCreationContext.reserveNode();
        long node2 = commandCreationContext.reserveNode();
        txState.nodeDoCreate(node1);
        txState.nodeDoCreate(node2);
        txState.relationshipDoCreate(commandCreationContext.reserveRelationship(), relTypeId, node1, node2);
        apply(txState, commandCreationContext, storageEngine);
        neoStores.flush(NULL);
    }
}
Also used : JobScheduler(org.neo4j.scheduler.JobScheduler) ThreadPoolJobScheduler(org.neo4j.test.scheduler.ThreadPoolJobScheduler) DefaultIdController(org.neo4j.internal.id.DefaultIdController) NullLogService(org.neo4j.logging.internal.NullLogService) Predicates(org.neo4j.function.Predicates) CursorContext(org.neo4j.io.pagecache.context.CursorContext) TokenCreator(org.neo4j.token.TokenCreator) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Config(org.neo4j.configuration.Config) LockVerificationMonitor(org.neo4j.internal.recordstorage.LockVerificationMonitor) NullLogProvider(org.neo4j.logging.NullLogProvider) ANY_LABEL(org.neo4j.token.api.TokenConstants.ANY_LABEL) TransactionToApply(org.neo4j.kernel.impl.api.TransactionToApply) DatabaseLayout(org.neo4j.io.layout.DatabaseLayout) DEFAULT_DATABASE_NAME(org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) PageCacheTracer(org.neo4j.io.pagecache.tracing.PageCacheTracer) AbstractBaseRecord(org.neo4j.kernel.impl.store.record.AbstractBaseRecord) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) RecoveryCleanupWorkCollector(org.neo4j.index.internal.gbptree.RecoveryCleanupWorkCollector) DatabaseSchemaState(org.neo4j.kernel.impl.api.DatabaseSchemaState) JobSchedulerFactory(org.neo4j.kernel.impl.scheduler.JobSchedulerFactory) NullLog(org.neo4j.logging.NullLog) Input(org.neo4j.internal.batchimport.input.Input) PageCache(org.neo4j.io.pagecache.PageCache) Lifespan(org.neo4j.kernel.lifecycle.Lifespan) DatabaseReadOnlyChecker.writable(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker.writable) TestDirectory(org.neo4j.test.rule.TestDirectory) RecordStorageEngine(org.neo4j.internal.recordstorage.RecordStorageEngine) LockService(org.neo4j.lock.LockService) Neo4jLayoutExtension(org.neo4j.test.extension.Neo4jLayoutExtension) Test(org.junit.jupiter.api.Test) RecordStore(org.neo4j.kernel.impl.store.RecordStore) List(java.util.List) CommandCreationContext(org.neo4j.storageengine.api.CommandCreationContext) INSTANCE(org.neo4j.memory.EmptyMemoryTracker.INSTANCE) Stream(java.util.stream.Stream) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) StoreType(org.neo4j.kernel.impl.store.StoreType) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) CommandsToApply(org.neo4j.storageengine.api.CommandsToApply) RelationshipType(org.neo4j.graphdb.RelationshipType) ANONYMOUS(org.neo4j.internal.kernel.api.security.AuthSubject.ANONYMOUS) RecordFormatSelector.selectForConfig(org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForConfig) PhysicalTransactionRepresentation(org.neo4j.kernel.impl.transaction.log.PhysicalTransactionRepresentation) EMPTY(org.neo4j.internal.batchimport.AdditionalInitialIds.EMPTY) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) BASE_TX_ID(org.neo4j.storageengine.api.TransactionIdStore.BASE_TX_ID) ConfiguringPageCacheFactory(org.neo4j.kernel.impl.pagecache.ConfiguringPageCacheFactory) ArrayList(java.util.ArrayList) TxState(org.neo4j.kernel.impl.api.state.TxState) RecordFormats(org.neo4j.kernel.impl.store.format.RecordFormats) StorageCommand(org.neo4j.storageengine.api.StorageCommand) Values(org.neo4j.values.storable.Values) TokenHolder(org.neo4j.token.api.TokenHolder) IndexConfigCompleter(org.neo4j.internal.schema.IndexConfigCompleter) NeoStores(org.neo4j.kernel.impl.store.NeoStores) Inject(org.neo4j.test.extension.Inject) DelegatingTokenHolder(org.neo4j.token.DelegatingTokenHolder) PropertyBlock(org.neo4j.kernel.impl.store.record.PropertyBlock) TransactionApplicationMode(org.neo4j.storageengine.api.TransactionApplicationMode) GraphDatabaseInternalSettings(org.neo4j.configuration.GraphDatabaseInternalSettings) GBPTreeCountsStore(org.neo4j.internal.counts.GBPTreeCountsStore) RecordStorageReader(org.neo4j.internal.recordstorage.RecordStorageReader) MemoryPools(org.neo4j.memory.MemoryPools) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) JobScheduler(org.neo4j.scheduler.JobScheduler) MemoryTracker(org.neo4j.memory.MemoryTracker) DOUBLE_RELATIONSHIP_RECORD_UNIT_THRESHOLD(org.neo4j.internal.batchimport.store.BatchingNeoStores.DOUBLE_RELATIONSHIP_RECORD_UNIT_THRESHOLD) PropertyStore(org.neo4j.kernel.impl.store.PropertyStore) BatchingNeoStores.batchingNeoStores(org.neo4j.internal.batchimport.store.BatchingNeoStores.batchingNeoStores) LockTracer(org.neo4j.lock.LockTracer) StandardConstraintSemantics(org.neo4j.kernel.impl.constraints.StandardConstraintSemantics) PageCacheExtension(org.neo4j.test.extension.pagecache.PageCacheExtension) Configuration(org.neo4j.internal.batchimport.Configuration) PropertyRecord(org.neo4j.kernel.impl.store.record.PropertyRecord) PanicEventGenerator(org.neo4j.monitoring.PanicEventGenerator) DirectoryNotEmptyException(java.nio.file.DirectoryNotEmptyException) IOException(java.io.IOException) TransactionState(org.neo4j.kernel.api.txstate.TransactionState) CommandLockVerification(org.neo4j.internal.recordstorage.CommandLockVerification) TokenStore(org.neo4j.kernel.impl.store.TokenStore) DatabaseHealth(org.neo4j.monitoring.DatabaseHealth) LATEST_RECORD_FORMATS(org.neo4j.kernel.impl.store.format.standard.Standard.LATEST_RECORD_FORMATS) ResourceLocker(org.neo4j.lock.ResourceLocker) CountsAccessor(org.neo4j.counts.CountsAccessor) RecoveryCleanupWorkCollector.immediate(org.neo4j.index.internal.gbptree.RecoveryCleanupWorkCollector.immediate) ForcedSecondaryUnitRecordFormats(org.neo4j.kernel.impl.store.format.ForcedSecondaryUnitRecordFormats) TokenHolders(org.neo4j.token.TokenHolders) CountsBuilder(org.neo4j.internal.counts.CountsBuilder) ThreadPoolJobScheduler(org.neo4j.test.scheduler.ThreadPoolJobScheduler) Clocks(org.neo4j.time.Clocks) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) DatabaseHealth(org.neo4j.monitoring.DatabaseHealth) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) NullLog(org.neo4j.logging.NullLog) ConfiguringPageCacheFactory(org.neo4j.kernel.impl.pagecache.ConfiguringPageCacheFactory) RecoveryCleanupWorkCollector(org.neo4j.index.internal.gbptree.RecoveryCleanupWorkCollector) IndexConfigCompleter(org.neo4j.internal.schema.IndexConfigCompleter) DefaultIdController(org.neo4j.internal.id.DefaultIdController) CommandCreationContext(org.neo4j.storageengine.api.CommandCreationContext) MemoryPools(org.neo4j.memory.MemoryPools) DatabaseSchemaState(org.neo4j.kernel.impl.api.DatabaseSchemaState) TxState(org.neo4j.kernel.impl.api.state.TxState) RecordStorageEngine(org.neo4j.internal.recordstorage.RecordStorageEngine) NeoStores(org.neo4j.kernel.impl.store.NeoStores) BatchingNeoStores.batchingNeoStores(org.neo4j.internal.batchimport.store.BatchingNeoStores.batchingNeoStores) TokenHolders(org.neo4j.token.TokenHolders) Lifespan(org.neo4j.kernel.lifecycle.Lifespan) DelegatingTokenHolder(org.neo4j.token.DelegatingTokenHolder) StandardConstraintSemantics(org.neo4j.kernel.impl.constraints.StandardConstraintSemantics) PageCache(org.neo4j.io.pagecache.PageCache)

Example 12 with DatabaseLayout

use of org.neo4j.io.layout.DatabaseLayout in project neo4j by neo4j.

the class RecoveryRequiredCheckerTest method shouldNotWantToRecoverEmptyStore.

@Test
void shouldNotWantToRecoverEmptyStore() throws Exception {
    DatabaseLayout databaseLayout = DatabaseLayout.ofFlat(testDirectory.directory("dir-without-store"));
    try (PageCache pageCache = pageCacheExtension.getPageCache(fileSystem)) {
        RecoveryRequiredChecker checker = getRecoveryCheckerWithDefaultConfig(fileSystem, pageCache, storageEngineFactory);
        assertFalse(checker.isRecoveryRequiredAt(databaseLayout, INSTANCE));
    }
}
Also used : DatabaseLayout(org.neo4j.io.layout.DatabaseLayout) PageCache(org.neo4j.io.pagecache.PageCache) Test(org.junit.jupiter.api.Test)

Example 13 with DatabaseLayout

use of org.neo4j.io.layout.DatabaseLayout in project neo4j by neo4j.

the class DegreesRebuildFromStoreTest method shouldRebuildDegreesStore.

@Test
void shouldRebuildDegreesStore() throws Exception {
    // given a dataset containing mixed sparse and dense nodes with relationships in random directions,
    // where some chains have been marked as having external degrees
    int denseThreshold = dense_node_threshold.defaultValue();
    DatabaseLayout layout = DatabaseLayout.ofFlat(directory.homePath());
    int[] relationshipTypes;
    MutableLongLongMap expectedDegrees = LongLongMaps.mutable.empty();
    try (Lifespan life = new Lifespan()) {
        RecordStorageEngine storageEngine = openStorageEngine(layout, denseThreshold);
        relationshipTypes = createRelationshipTypes(storageEngine);
        life.add(storageEngine);
        generateData(storageEngine, denseThreshold, relationshipTypes);
        storageEngine.relationshipGroupDegreesStore().accept((groupId, direction, degree) -> expectedDegrees.put(combinedKeyOnGroupAndDirection(groupId, direction), degree), NULL);
        assertThat(expectedDegrees.isEmpty()).isFalse();
        storageEngine.flushAndForce(NULL);
    }
    // when
    directory.getFileSystem().deleteFile(layout.relationshipGroupDegreesStore());
    try (Lifespan life = new Lifespan()) {
        RecordStorageEngine storageEngine = life.add(openStorageEngine(layout, denseThreshold));
        // then
        storageEngine.relationshipGroupDegreesStore().accept((groupId, direction, degree) -> {
            long key = combinedKeyOnGroupAndDirection(groupId, direction);
            assertThat(expectedDegrees.containsKey(key)).isTrue();
            long expectedDegree = expectedDegrees.get(key);
            expectedDegrees.remove(key);
            assertThat(degree).isEqualTo(expectedDegree);
        }, NULL);
    }
    assertThat(expectedDegrees.size()).isEqualTo(0);
}
Also used : RecordStorageEngine(org.neo4j.internal.recordstorage.RecordStorageEngine) DatabaseLayout(org.neo4j.io.layout.DatabaseLayout) MutableLongLongMap(org.eclipse.collections.api.map.primitive.MutableLongLongMap) Lifespan(org.neo4j.kernel.lifecycle.Lifespan) Test(org.junit.jupiter.api.Test)

Example 14 with DatabaseLayout

use of org.neo4j.io.layout.DatabaseLayout in project neo4j by neo4j.

the class ConsistencyCheckingApplierTest method setUp.

@BeforeEach
void setUp() {
    Config config = Config.defaults(neo4j_home, directory.homePath());
    DatabaseLayout layout = DatabaseLayout.of(config);
    neoStores = new StoreFactory(layout, config, new DefaultIdGeneratorFactory(directory.getFileSystem(), immediate(), DEFAULT_DATABASE_NAME), pageCache, directory.getFileSystem(), NullLogProvider.getInstance(), PageCacheTracer.NULL, writable()).openAllNeoStores(true);
    RelationshipStore relationshipStore = neoStores.getRelationshipStore();
    checker = new ConsistencyCheckingApplier(relationshipStore, CursorContext.NULL);
    BatchContext batchContext = mock(BatchContext.class);
    when(batchContext.getLockGroup()).thenReturn(new LockGroup());
    applier = new NeoStoreTransactionApplier(CommandVersion.AFTER, neoStores, mock(CacheAccessBackDoor.class), LockService.NO_LOCK_SERVICE, 0, batchContext, CursorContext.NULL);
    appliers = new TransactionApplier[] { checker, applier };
}
Also used : LockGroup(org.neo4j.lock.LockGroup) Config(org.neo4j.configuration.Config) DatabaseLayout(org.neo4j.io.layout.DatabaseLayout) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) RelationshipStore(org.neo4j.kernel.impl.store.RelationshipStore) StoreFactory(org.neo4j.kernel.impl.store.StoreFactory) ConsistencyCheckingApplier(org.neo4j.internal.recordstorage.ConsistencyCheckingApplierFactory.ConsistencyCheckingApplier) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 15 with DatabaseLayout

use of org.neo4j.io.layout.DatabaseLayout in project neo4j by neo4j.

the class Recovery method instantiateRecoveryExtensions.

private static DatabaseExtensions instantiateRecoveryExtensions(DatabaseLayout databaseLayout, FileSystemAbstraction fileSystem, Config config, LogService logService, PageCache pageCache, JobScheduler jobScheduler, DbmsInfo dbmsInfo, Monitors monitors, TokenHolders tokenHolders, RecoveryCleanupWorkCollector recoveryCleanupCollector, DatabaseReadOnlyChecker readOnlyChecker, Iterable<ExtensionFactory<?>> extensionFactories, PageCacheTracer pageCacheTracer) {
    List<ExtensionFactory<?>> recoveryExtensions = stream(extensionFactories).filter(extension -> extension.getClass().isAnnotationPresent(RecoveryExtension.class)).collect(toList());
    Dependencies deps = new Dependencies();
    NonListenableMonitors nonListenableMonitors = new NonListenableMonitors(monitors, logService.getInternalLogProvider());
    deps.satisfyDependencies(fileSystem, config, logService, pageCache, nonListenableMonitors, jobScheduler, tokenHolders, recoveryCleanupCollector, pageCacheTracer, databaseLayout, readOnlyChecker);
    DatabaseExtensionContext extensionContext = new DatabaseExtensionContext(databaseLayout, dbmsInfo, deps);
    return new DatabaseExtensions(extensionContext, recoveryExtensions, deps, ExtensionFailureStrategies.fail());
}
Also used : DatabaseExtensionContext(org.neo4j.kernel.extension.context.DatabaseExtensionContext) DefaultIdController(org.neo4j.internal.id.DefaultIdController) LogFilesBuilder(org.neo4j.kernel.impl.transaction.log.files.LogFilesBuilder) Config(org.neo4j.configuration.Config) NullLogProvider(org.neo4j.logging.NullLogProvider) VersionAwareLogEntryReader(org.neo4j.kernel.impl.transaction.log.entry.VersionAwareLogEntryReader) IndexStatisticsStore(org.neo4j.kernel.impl.api.index.stats.IndexStatisticsStore) DatabasePageCache(org.neo4j.dbms.database.DatabasePageCache) ReadOnlyTokenCreator(org.neo4j.token.ReadOnlyTokenCreator) PageCacheTracer(org.neo4j.io.pagecache.tracing.PageCacheTracer) RecoveryCleanupWorkCollector(org.neo4j.index.internal.gbptree.RecoveryCleanupWorkCollector) NullLog(org.neo4j.logging.NullLog) Path(java.nio.file.Path) INDEX_CLEANUP_WORK(org.neo4j.scheduler.Group.INDEX_CLEANUP_WORK) EMPTY_CHECKER(org.neo4j.kernel.recovery.RecoveryStartupChecker.EMPTY_CHECKER) TransactionLogFilesHelper(org.neo4j.kernel.impl.transaction.log.files.TransactionLogFilesHelper) StorageFilesState(org.neo4j.storageengine.api.StorageFilesState) Dependencies(org.neo4j.collection.Dependencies) IOController(org.neo4j.io.pagecache.IOController) FullScanStoreView(org.neo4j.kernel.impl.transaction.state.storeview.FullScanStoreView) Services(org.neo4j.service.Services) SimpleTriggerInfo(org.neo4j.kernel.impl.transaction.log.checkpoint.SimpleTriggerInfo) Database(org.neo4j.kernel.database.Database) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) Tracers(org.neo4j.kernel.monitoring.tracing.Tracers) VersionContextSupplier(org.neo4j.io.pagecache.context.VersionContextSupplier) IndexingService(org.neo4j.kernel.impl.api.index.IndexingService) RecoveryThreshold(org.neo4j.kernel.impl.transaction.log.checkpoint.RecoveryThreshold) DefaultForceOperation(org.neo4j.kernel.database.DefaultForceOperation) DelegatingTokenHolder(org.neo4j.token.DelegatingTokenHolder) TYPE_PROPERTY_KEY(org.neo4j.token.api.TokenHolder.TYPE_PROPERTY_KEY) DatabaseExtensions(org.neo4j.kernel.extension.DatabaseExtensions) DefaultIndexProviderMap(org.neo4j.kernel.impl.transaction.state.DefaultIndexProviderMap) MemoryTracker(org.neo4j.memory.MemoryTracker) Lifecycle(org.neo4j.kernel.lifecycle.Lifecycle) PanicEventGenerator(org.neo4j.monitoring.PanicEventGenerator) TransactionMetadataCache(org.neo4j.kernel.impl.transaction.log.TransactionMetadataCache) IOException(java.io.IOException) DatabaseTracers(org.neo4j.kernel.database.DatabaseTracers) ExtensionFactory(org.neo4j.kernel.extension.ExtensionFactory) TokenHolders(org.neo4j.token.TokenHolders) TYPE_LABEL(org.neo4j.token.api.TokenHolder.TYPE_LABEL) StoreCopyCheckPointMutex(org.neo4j.kernel.impl.transaction.log.checkpoint.StoreCopyCheckPointMutex) LifecycleAdapter(org.neo4j.kernel.lifecycle.LifecycleAdapter) Log(org.neo4j.logging.Log) BatchingTransactionAppender(org.neo4j.kernel.impl.transaction.log.BatchingTransactionAppender) LifeSupport(org.neo4j.kernel.lifecycle.LifeSupport) DatabaseLayout(org.neo4j.io.layout.DatabaseLayout) LogRotation(org.neo4j.kernel.impl.transaction.log.rotation.LogRotation) RecoveryState(org.neo4j.storageengine.api.RecoveryState) Monitors(org.neo4j.monitoring.Monitors) LogVersionRepository(org.neo4j.storageengine.api.LogVersionRepository) CheckPointerImpl(org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointerImpl) DatabaseSchemaState(org.neo4j.kernel.impl.api.DatabaseSchemaState) JobSchedulerFactory(org.neo4j.kernel.impl.scheduler.JobSchedulerFactory) PageCache(org.neo4j.io.pagecache.PageCache) LegacyTransactionLogsLocator(org.neo4j.kernel.impl.storemigration.LegacyTransactionLogsLocator) StorageEngine(org.neo4j.storageengine.api.StorageEngine) DatabaseReadOnlyChecker.writable(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker.writable) LogProgressReporter(org.neo4j.kernel.impl.util.monitoring.LogProgressReporter) String.format(java.lang.String.format) List(java.util.List) NO_LOCK_SERVICE(org.neo4j.lock.LockService.NO_LOCK_SERVICE) SimpleLogService(org.neo4j.logging.internal.SimpleLogService) Optional(java.util.Optional) DatabaseReadOnlyChecker(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker) TYPE_RELATIONSHIP_TYPE(org.neo4j.token.api.TokenHolder.TYPE_RELATIONSHIP_TYPE) PhysicalLogicalTransactionStore(org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore) LogFiles(org.neo4j.kernel.impl.transaction.log.files.LogFiles) LogicalTransactionStore(org.neo4j.kernel.impl.transaction.log.LogicalTransactionStore) Config.defaults(org.neo4j.configuration.Config.defaults) ProgressReporter(org.neo4j.common.ProgressReporter) GraphDatabaseSettings(org.neo4j.configuration.GraphDatabaseSettings) LogProvider(org.neo4j.logging.LogProvider) ConfiguringPageCacheFactory(org.neo4j.kernel.impl.pagecache.ConfiguringPageCacheFactory) GroupingRecoveryCleanupWorkCollector(org.neo4j.index.internal.gbptree.GroupingRecoveryCleanupWorkCollector) Clocks.systemClock(org.neo4j.time.Clocks.systemClock) Iterables(org.neo4j.internal.helpers.collection.Iterables) Objects.requireNonNull(java.util.Objects.requireNonNull) StoreId(org.neo4j.storageengine.api.StoreId) GraphDatabaseInternalSettings(org.neo4j.configuration.GraphDatabaseInternalSettings) DbmsInfo(org.neo4j.kernel.impl.factory.DbmsInfo) LogPruning(org.neo4j.kernel.impl.transaction.log.pruning.LogPruning) MemoryPools(org.neo4j.memory.MemoryPools) IndexStoreViewFactory(org.neo4j.kernel.impl.transaction.state.storeview.IndexStoreViewFactory) JobScheduler(org.neo4j.scheduler.JobScheduler) Iterables.stream(org.neo4j.internal.helpers.collection.Iterables.stream) DatabaseHealth(org.neo4j.monitoring.DatabaseHealth) NO_LOCKS(org.neo4j.kernel.impl.locking.Locks.NO_LOCKS) ConstraintSemantics.getConstraintSemantics(org.neo4j.kernel.impl.constraints.ConstraintSemantics.getConstraintSemantics) LogService(org.neo4j.logging.internal.LogService) StorageEngineFactory(org.neo4j.storageengine.api.StorageEngineFactory) INDEX_CLEANUP(org.neo4j.scheduler.Group.INDEX_CLEANUP) MetadataProvider(org.neo4j.storageengine.api.MetadataProvider) DefaultFileSystemAbstraction(org.neo4j.io.fs.DefaultFileSystemAbstraction) Collectors.toList(java.util.stream.Collectors.toList) StorageEngineFactory.selectStorageEngine(org.neo4j.storageengine.api.StorageEngineFactory.selectStorageEngine) Clock(java.time.Clock) ExtensionFailureStrategies(org.neo4j.kernel.extension.ExtensionFailureStrategies) TransactionIdStore(org.neo4j.storageengine.api.TransactionIdStore) Clocks(org.neo4j.time.Clocks) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) EmptyVersionContextSupplier(org.neo4j.io.pagecache.context.EmptyVersionContextSupplier) ExtensionFactory(org.neo4j.kernel.extension.ExtensionFactory) DatabaseExtensionContext(org.neo4j.kernel.extension.context.DatabaseExtensionContext) DatabaseExtensions(org.neo4j.kernel.extension.DatabaseExtensions) Dependencies(org.neo4j.collection.Dependencies)

Aggregations

DatabaseLayout (org.neo4j.io.layout.DatabaseLayout)108 Test (org.junit.jupiter.api.Test)66 Path (java.nio.file.Path)51 Config (org.neo4j.configuration.Config)35 FileSystemAbstraction (org.neo4j.io.fs.FileSystemAbstraction)24 GraphDatabaseAPI (org.neo4j.kernel.internal.GraphDatabaseAPI)19 DefaultFileSystemAbstraction (org.neo4j.io.fs.DefaultFileSystemAbstraction)17 PageCache (org.neo4j.io.pagecache.PageCache)17 IOException (java.io.IOException)16 ConsistencyCheckService (org.neo4j.consistency.ConsistencyCheckService)16 Transaction (org.neo4j.graphdb.Transaction)13 DefaultIdGeneratorFactory (org.neo4j.internal.id.DefaultIdGeneratorFactory)10 DatabaseManagementService (org.neo4j.dbms.api.DatabaseManagementService)9 TestDatabaseManagementServiceBuilder (org.neo4j.test.TestDatabaseManagementServiceBuilder)9 CommandFailedException (org.neo4j.cli.CommandFailedException)8 ExecutionContext (org.neo4j.cli.ExecutionContext)8 PageCacheTracer (org.neo4j.io.pagecache.tracing.PageCacheTracer)8 StorageEngineFactory (org.neo4j.storageengine.api.StorageEngineFactory)8 Closeable (java.io.Closeable)7 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)7