Search in sources :

Example 36 with DefaultIdGeneratorFactory

use of org.neo4j.internal.id.DefaultIdGeneratorFactory in project neo4j by neo4j.

the class SchemaStore35Test method before.

@BeforeEach
void before() {
    Config config = Config.defaults();
    DefaultIdGeneratorFactory idGeneratorFactory = new DefaultIdGeneratorFactory(fs, immediate(), DEFAULT_DATABASE_NAME);
    NullLogProvider logProvider = NullLogProvider.getInstance();
    store = new SchemaStore35(testDirectory.file("schema35"), testDirectory.file("schema35.db.id"), config, IdType.SCHEMA, idGeneratorFactory, pageCache, logProvider, StandardV3_4.RECORD_FORMATS, writable(), DEFAULT_DATABASE_NAME, immutable.empty());
    store.initialise(true, NULL);
}
Also used : Config(org.neo4j.configuration.Config) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) NullLogProvider(org.neo4j.logging.NullLogProvider) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 37 with DefaultIdGeneratorFactory

use of org.neo4j.internal.id.DefaultIdGeneratorFactory in project neo4j by neo4j.

the class ConsistencyCheckService method runFullConsistencyCheck.

public Result runFullConsistencyCheck(DatabaseLayout databaseLayout, Config config, ProgressMonitorFactory progressFactory, final LogProvider logProvider, final FileSystemAbstraction fileSystem, final PageCache pageCache, DebugContext debugContext, Path reportDir, ConsistencyFlags consistencyFlags, PageCacheTracer pageCacheTracer, MemoryTracker memoryTracker) throws ConsistencyCheckIncompleteException {
    assertRecovered(databaseLayout, config, fileSystem, memoryTracker);
    Log outLog = logProvider.getLog(getClass());
    config.set(GraphDatabaseSettings.pagecache_warmup_enabled, false);
    LifeSupport life = new LifeSupport();
    final DefaultIdGeneratorFactory idGeneratorFactory = new DefaultIdGeneratorFactory(fileSystem, immediate(), databaseLayout.getDatabaseName());
    DatabaseReadOnlyChecker readOnlyChecker = readOnly();
    StoreFactory factory = new StoreFactory(databaseLayout, config, idGeneratorFactory, pageCache, fileSystem, logProvider, pageCacheTracer, readOnlyChecker);
    // Don't start the counts stores here as part of life, instead only shut down. This is because it's better to let FullCheck
    // start it and add its missing/broken detection where it can report to user.
    ConsistencySummaryStatistics summary;
    final Path reportFile = chooseReportPath(reportDir);
    Log4jLogProvider reportLogProvider = new Log4jLogProvider(LogConfig.createBuilder(fileSystem, reportFile, Level.INFO).createOnDemand().withCategory(false).build());
    Log reportLog = reportLogProvider.getLog(getClass());
    Log log = new DuplicatingLog(outLog, reportLog);
    // Bootstrap kernel extensions
    Monitors monitors = new Monitors();
    JobScheduler jobScheduler = life.add(JobSchedulerFactory.createInitialisedScheduler());
    TokenHolders tokenHolders = new TokenHolders(new DelegatingTokenHolder(new ReadOnlyTokenCreator(), TokenHolder.TYPE_PROPERTY_KEY), new DelegatingTokenHolder(new ReadOnlyTokenCreator(), TokenHolder.TYPE_LABEL), new DelegatingTokenHolder(new ReadOnlyTokenCreator(), TokenHolder.TYPE_RELATIONSHIP_TYPE));
    final RecoveryCleanupWorkCollector workCollector = RecoveryCleanupWorkCollector.ignore();
    DatabaseExtensions extensions = life.add(instantiateExtensions(databaseLayout, fileSystem, config, new SimpleLogService(logProvider), pageCache, jobScheduler, workCollector, // We use TOOL context because it's true, and also because it uses the 'single' operational mode, which is important.
    TOOL, monitors, tokenHolders, pageCacheTracer, readOnlyChecker));
    DefaultIndexProviderMap indexes = life.add(new DefaultIndexProviderMap(extensions, config));
    try (NeoStores neoStores = factory.openAllNeoStores()) {
        long lastCommittedTransactionId = neoStores.getMetaDataStore().getLastCommittedTransactionId();
        CountsStoreManager countsStoreManager = life.add(new CountsStoreManager(pageCache, fileSystem, databaseLayout, pageCacheTracer, memoryTracker, lastCommittedTransactionId));
        RelationshipGroupDegreesStoreManager groupDegreesStoreManager = life.add(new RelationshipGroupDegreesStoreManager(pageCache, fileSystem, databaseLayout, pageCacheTracer, memoryTracker, lastCommittedTransactionId));
        // Load tokens before starting extensions, etc.
        try (var cursorContext = new CursorContext(pageCacheTracer.createPageCursorTracer(CONSISTENCY_TOKEN_READER_TAG))) {
            tokenHolders.setInitialTokens(StoreTokens.allReadableTokens(neoStores), cursorContext);
        }
        life.start();
        IndexStatisticsStore indexStatisticsStore = new IndexStatisticsStore(pageCache, databaseLayout, workCollector, readOnlyChecker, pageCacheTracer);
        life.add(indexStatisticsStore);
        int numberOfThreads = defaultConsistencyCheckThreadsNumber();
        DirectStoreAccess stores = new DirectStoreAccess(neoStores, indexes, tokenHolders, indexStatisticsStore, idGeneratorFactory);
        double memoryLimitLeewayFactor = config.get(GraphDatabaseInternalSettings.consistency_check_memory_limit_factor);
        FullCheck check = new FullCheck(progressFactory, numberOfThreads, consistencyFlags, config, debugContext, NodeBasedMemoryLimiter.defaultWithLeeway(memoryLimitLeewayFactor));
        summary = check.execute(pageCache, stores, countsStoreManager, groupDegreesStoreManager, null, pageCacheTracer, memoryTracker, log);
    } finally {
        life.shutdown();
        reportLogProvider.close();
    }
    if (!summary.isConsistent()) {
        log.warn("See '%s' for a detailed consistency report.", reportFile);
        return Result.failure(reportFile, summary);
    }
    return Result.success(reportFile, summary);
}
Also used : SimpleLogService(org.neo4j.logging.internal.SimpleLogService) Log4jLogProvider(org.neo4j.logging.log4j.Log4jLogProvider) DirectStoreAccess(org.neo4j.consistency.store.DirectStoreAccess) StoreFactory(org.neo4j.kernel.impl.store.StoreFactory) RecoveryCleanupWorkCollector(org.neo4j.index.internal.gbptree.RecoveryCleanupWorkCollector) DatabaseReadOnlyChecker(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker) IndexStatisticsStore(org.neo4j.kernel.impl.api.index.stats.IndexStatisticsStore) LifeSupport(org.neo4j.kernel.lifecycle.LifeSupport) DuplicatingLog(org.neo4j.logging.DuplicatingLog) TokenHolders(org.neo4j.token.TokenHolders) DelegatingTokenHolder(org.neo4j.token.DelegatingTokenHolder) ConsistencySummaryStatistics(org.neo4j.consistency.report.ConsistencySummaryStatistics) Path(java.nio.file.Path) JobScheduler(org.neo4j.scheduler.JobScheduler) Log(org.neo4j.logging.Log) DuplicatingLog(org.neo4j.logging.DuplicatingLog) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) DatabaseExtensions(org.neo4j.kernel.extension.DatabaseExtensions) CursorContext(org.neo4j.io.pagecache.context.CursorContext) DefaultIndexProviderMap(org.neo4j.kernel.impl.transaction.state.DefaultIndexProviderMap) FullCheck(org.neo4j.consistency.checking.full.FullCheck) NeoStores(org.neo4j.kernel.impl.store.NeoStores) Monitors(org.neo4j.monitoring.Monitors) ReadOnlyTokenCreator(org.neo4j.token.ReadOnlyTokenCreator)

Example 38 with DefaultIdGeneratorFactory

use of org.neo4j.internal.id.DefaultIdGeneratorFactory in project neo4j by neo4j.

the class FulltextIndexProviderTest method indexWithUnknownAnalyzerWillBeMarkedAsFailedOnStartup.

@Test
void indexWithUnknownAnalyzerWillBeMarkedAsFailedOnStartup() throws Exception {
    // Create a full-text index.
    long indexId;
    try (KernelTransactionImplementation transaction = getKernelTransaction()) {
        int[] propertyIds = { propIdHa };
        SchemaDescriptor schema = SchemaDescriptor.fulltext(EntityType.NODE, new int[] { labelIdHa }, propertyIds);
        IndexPrototype prototype = IndexPrototype.forSchema(schema).withIndexType(FULLTEXT).withName(NAME);
        SchemaWrite schemaWrite = transaction.schemaWrite();
        IndexDescriptor index = schemaWrite.indexCreate(prototype);
        indexId = index.getId();
        transaction.success();
    }
    // Modify the full-text index such that it has an analyzer configured that does not exist.
    controller.restartDbms(builder -> {
        var cacheTracer = NULL;
        FileSystemAbstraction fs = builder.getFileSystem();
        DatabaseLayout databaseLayout = Neo4jLayout.of(builder.getHomeDirectory()).databaseLayout(DEFAULT_DATABASE_NAME);
        DefaultIdGeneratorFactory idGenFactory = new DefaultIdGeneratorFactory(fs, RecoveryCleanupWorkCollector.ignore(), databaseLayout.getDatabaseName());
        try (JobScheduler scheduler = JobSchedulerFactory.createInitialisedScheduler();
            PageCache pageCache = StandalonePageCacheFactory.createPageCache(fs, scheduler, cacheTracer)) {
            StoreFactory factory = new StoreFactory(databaseLayout, Config.defaults(), idGenFactory, pageCache, fs, NullLogProvider.getInstance(), cacheTracer, writable());
            var cursorContext = CursorContext.NULL;
            try (NeoStores neoStores = factory.openAllNeoStores(false)) {
                TokenHolders tokens = StoreTokens.readOnlyTokenHolders(neoStores, CursorContext.NULL);
                SchemaStore schemaStore = neoStores.getSchemaStore();
                SchemaStorage storage = new SchemaStorage(schemaStore, tokens, () -> KernelVersion.LATEST);
                IndexDescriptor index = (IndexDescriptor) storage.loadSingleSchemaRule(indexId, CursorContext.NULL);
                Map<String, Value> indexConfigMap = new HashMap<>(index.getIndexConfig().asMap());
                for (Map.Entry<String, Value> entry : indexConfigMap.entrySet()) {
                    if (entry.getKey().contains("analyzer")) {
                        // This analyzer does not exist!
                        entry.setValue(Values.stringValue("bla-bla-lyzer"));
                    }
                }
                index = index.withIndexConfig(IndexConfig.with(indexConfigMap));
                storage.writeSchemaRule(index, cursorContext, INSTANCE);
                schemaStore.flush(cursorContext);
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return builder;
    });
    // Verify that the index comes up in a failed state.
    try (Transaction tx = db.beginTx()) {
        IndexDefinition index = tx.schema().getIndexByName(NAME);
        Schema.IndexState indexState = tx.schema().getIndexState(index);
        assertThat(indexState).isEqualTo(Schema.IndexState.FAILED);
        String indexFailure = tx.schema().getIndexFailure(index);
        assertThat(indexFailure).contains("bla-bla-lyzer");
    }
    // Verify that the failed index can be dropped.
    try (Transaction tx = db.beginTx()) {
        tx.schema().getIndexByName(NAME).drop();
        assertThrows(IllegalArgumentException.class, () -> tx.schema().getIndexByName(NAME));
        tx.commit();
    }
    try (Transaction tx = db.beginTx()) {
        assertThrows(IllegalArgumentException.class, () -> tx.schema().getIndexByName(NAME));
    }
    controller.restartDbms();
    try (Transaction tx = db.beginTx()) {
        assertThrows(IllegalArgumentException.class, () -> tx.schema().getIndexByName(NAME));
    }
}
Also used : FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) HashMap(java.util.HashMap) Schema(org.neo4j.graphdb.schema.Schema) IndexPrototype(org.neo4j.internal.schema.IndexPrototype) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) StoreFactory(org.neo4j.kernel.impl.store.StoreFactory) SchemaStorage(org.neo4j.internal.recordstorage.SchemaStorage) IndexDefinition(org.neo4j.graphdb.schema.IndexDefinition) KernelTransactionImplementation(org.neo4j.kernel.impl.api.KernelTransactionImplementation) DatabaseLayout(org.neo4j.io.layout.DatabaseLayout) TokenHolders(org.neo4j.token.TokenHolders) PageCache(org.neo4j.io.pagecache.PageCache) JobScheduler(org.neo4j.scheduler.JobScheduler) SchemaDescriptor(org.neo4j.internal.schema.SchemaDescriptor) SchemaWrite(org.neo4j.internal.kernel.api.SchemaWrite) SchemaStore(org.neo4j.kernel.impl.store.SchemaStore) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) IndexNotApplicableKernelException(org.neo4j.internal.kernel.api.exceptions.schema.IndexNotApplicableKernelException) KernelException(org.neo4j.exceptions.KernelException) TransactionFailureException(org.neo4j.internal.kernel.api.exceptions.TransactionFailureException) InternalTransaction(org.neo4j.kernel.impl.coreapi.InternalTransaction) Transaction(org.neo4j.graphdb.Transaction) KernelTransaction(org.neo4j.kernel.api.KernelTransaction) NeoStores(org.neo4j.kernel.impl.store.NeoStores) Value(org.neo4j.values.storable.Value) Map(java.util.Map) HashMap(java.util.HashMap) Test(org.junit.jupiter.api.Test)

Example 39 with DefaultIdGeneratorFactory

use of org.neo4j.internal.id.DefaultIdGeneratorFactory in project neo4j by neo4j.

the class NeoStoresTest method testSetLatestConstraintTx.

@Test
void testSetLatestConstraintTx() throws IOException {
    // given
    Config config = Config.defaults();
    StoreFactory sf = new StoreFactory(databaseLayout, config, new DefaultIdGeneratorFactory(fs, immediate(), databaseLayout.getDatabaseName()), pageCache, fs, LOG_PROVIDER, PageCacheTracer.NULL, writable());
    // when
    NeoStores neoStores = sf.openAllNeoStores(true);
    MetaDataStore metaDataStore = neoStores.getMetaDataStore();
    // then the default is 0
    assertEquals(0L, metaDataStore.getLatestConstraintIntroducingTx());
    // when
    metaDataStore.setLatestConstraintIntroducingTx(10L, NULL);
    // then
    assertEquals(10L, metaDataStore.getLatestConstraintIntroducingTx());
    // when
    neoStores.flush(NULL);
    neoStores.close();
    neoStores = sf.openAllNeoStores();
    // then the value should have been stored
    assertEquals(10L, neoStores.getMetaDataStore().getLatestConstraintIntroducingTx());
    neoStores.close();
}
Also used : Config(org.neo4j.configuration.Config) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) Test(org.junit.jupiter.api.Test)

Example 40 with DefaultIdGeneratorFactory

use of org.neo4j.internal.id.DefaultIdGeneratorFactory in project neo4j by neo4j.

the class NeoStoresTest method reinitializeStores.

private void reinitializeStores(DatabaseLayout databaseLayout) {
    Dependencies dependencies = new Dependencies();
    Config config = Config.defaults(GraphDatabaseSettings.fail_on_missing_files, false);
    dependencies.satisfyDependency(config);
    closeStorageEngine();
    IdGeneratorFactory idGeneratorFactory = new DefaultIdGeneratorFactory(fs, immediate(), databaseLayout.getDatabaseName());
    TokenHolders tokenHolders = new TokenHolders(createReadOnlyTokenHolder(TokenHolder.TYPE_PROPERTY_KEY), createReadOnlyTokenHolder(TokenHolder.TYPE_LABEL), createReadOnlyTokenHolder(TokenHolder.TYPE_RELATIONSHIP_TYPE));
    storageEngine = new RecordStorageEngine(databaseLayout, config, pageCache, fs, nullLogProvider(), tokenHolders, new DatabaseSchemaState(nullLogProvider()), new StandardConstraintRuleAccessor(), i -> i, NO_LOCK_SERVICE, mock(Health.class), idGeneratorFactory, new DefaultIdController(), immediate(), PageCacheTracer.NULL, true, INSTANCE, writable(), CommandLockVerification.Factory.IGNORE, LockVerificationMonitor.Factory.IGNORE);
    life = new LifeSupport();
    life.add(storageEngine);
    life.add(storageEngine.schemaAndTokensLifecycle());
    life.start();
    NeoStores neoStores = storageEngine.testAccessNeoStores();
    pStore = neoStores.getPropertyStore();
    nodeStore = neoStores.getNodeStore();
    storageReader = storageEngine.newReader();
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) Sets.immutable(org.eclipse.collections.api.factory.Sets.immutable) LongSupplier(java.util.function.LongSupplier) DefaultIdController(org.neo4j.internal.id.DefaultIdController) CursorContext(org.neo4j.io.pagecache.context.CursorContext) NORMAL(org.neo4j.kernel.impl.store.record.RecordLoad.NORMAL) Config(org.neo4j.configuration.Config) Value(org.neo4j.values.storable.Value) NullLogProvider(org.neo4j.logging.NullLogProvider) INTERNAL(org.neo4j.storageengine.api.TransactionApplicationMode.INTERNAL) EMPTY_BYTE_ARRAY(org.apache.commons.lang3.ArrayUtils.EMPTY_BYTE_ARRAY) StorageNodeCursor(org.neo4j.storageengine.api.StorageNodeCursor) DEFAULT_DATABASE_NAME(org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME) StorageRelationshipScanCursor(org.neo4j.storageengine.api.StorageRelationshipScanCursor) Duration(java.time.Duration) PageCacheTracer(org.neo4j.io.pagecache.tracing.PageCacheTracer) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) RecoveryCleanupWorkCollector(org.neo4j.index.internal.gbptree.RecoveryCleanupWorkCollector) Path(java.nio.file.Path) PageCursorTracer(org.neo4j.io.pagecache.tracing.cursor.PageCursorTracer) StoreTokens.createReadOnlyTokenHolder(org.neo4j.internal.recordstorage.StoreTokens.createReadOnlyTokenHolder) Position(org.neo4j.kernel.impl.store.MetaDataStore.Position) Dependencies(org.neo4j.collection.Dependencies) UncloseableDelegatingFileSystemAbstraction(org.neo4j.io.fs.UncloseableDelegatingFileSystemAbstraction) PropertyKeyValue(org.neo4j.storageengine.api.PropertyKeyValue) IdType(org.neo4j.internal.id.IdType) EphemeralNeo4jLayoutExtension(org.neo4j.test.extension.EphemeralNeo4jLayoutExtension) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) RelationshipType(org.neo4j.graphdb.RelationshipType) Mockito.mock(org.mockito.Mockito.mock) AUTH_DISABLED(org.neo4j.internal.kernel.api.security.AuthSubject.AUTH_DISABLED) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) TransactionId(org.neo4j.storageengine.api.TransactionId) RecordFormatSelector(org.neo4j.kernel.impl.store.format.RecordFormatSelector) Node(org.neo4j.graphdb.Node) ArrayList(java.util.ArrayList) TestDatabaseManagementServiceBuilder(org.neo4j.test.TestDatabaseManagementServiceBuilder) DelegatingTokenHolder(org.neo4j.token.DelegatingTokenHolder) StorageReader(org.neo4j.storageengine.api.StorageReader) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) NONE(org.neo4j.lock.LockTracer.NONE) NullLogProvider.nullLogProvider(org.neo4j.logging.NullLogProvider.nullLogProvider) UTF8(org.neo4j.string.UTF8) IOException(java.io.IOException) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) RecoveryCleanupWorkCollector.immediate(org.neo4j.index.internal.gbptree.RecoveryCleanupWorkCollector.immediate) AfterEach(org.junit.jupiter.api.AfterEach) KernelException(org.neo4j.exceptions.KernelException) TokenHolders(org.neo4j.token.TokenHolders) CURRENT_FORMAT_LOG_HEADER_SIZE(org.neo4j.kernel.impl.transaction.log.entry.LogVersions.CURRENT_FORMAT_LOG_HEADER_SIZE) NodeRecord(org.neo4j.kernel.impl.store.record.NodeRecord) IndexedIdGenerator(org.neo4j.internal.id.indexed.IndexedIdGenerator) Assertions.assertNotEquals(org.junit.jupiter.api.Assertions.assertNotEquals) DefaultPageCacheTracer(org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer) LockVerificationMonitor(org.neo4j.internal.recordstorage.LockVerificationMonitor) LifeSupport(org.neo4j.kernel.lifecycle.LifeSupport) TransactionToApply(org.neo4j.kernel.impl.api.TransactionToApply) ByteBuffer(java.nio.ByteBuffer) DatabaseLayout(org.neo4j.io.layout.DatabaseLayout) UnderlyingStorageException(org.neo4j.exceptions.UnderlyingStorageException) StoreChannel(org.neo4j.io.fs.StoreChannel) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) StorageRelationshipTraversalCursor(org.neo4j.storageengine.api.StorageRelationshipTraversalCursor) DatabaseSchemaState(org.neo4j.kernel.impl.api.DatabaseSchemaState) Record(org.neo4j.kernel.impl.store.record.Record) PageCache(org.neo4j.io.pagecache.PageCache) DatabaseReadOnlyChecker.writable(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker.writable) TestDirectory(org.neo4j.test.rule.TestDirectory) BASE_TX_COMMIT_TIMESTAMP(org.neo4j.storageengine.api.TransactionIdStore.BASE_TX_COMMIT_TIMESTAMP) RecordStorageEngine(org.neo4j.internal.recordstorage.RecordStorageEngine) StoragePropertyCursor(org.neo4j.storageengine.api.StoragePropertyCursor) Test(org.junit.jupiter.api.Test) List(java.util.List) CommandCreationContext(org.neo4j.storageengine.api.CommandCreationContext) INSTANCE(org.neo4j.memory.EmptyMemoryTracker.INSTANCE) NO_LOCK_SERVICE(org.neo4j.lock.LockService.NO_LOCK_SERVICE) StorageProperty(org.neo4j.storageengine.api.StorageProperty) DatabaseReadOnlyChecker(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker) DatabaseManagementService(org.neo4j.dbms.api.DatabaseManagementService) PhysicalTransactionRepresentation(org.neo4j.kernel.impl.transaction.log.PhysicalTransactionRepresentation) RelationshipVisitor(org.neo4j.storageengine.api.RelationshipVisitor) IdGeneratorFactory(org.neo4j.internal.id.IdGeneratorFactory) GraphDatabaseSettings(org.neo4j.configuration.GraphDatabaseSettings) 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) StandardConstraintRuleAccessor(org.neo4j.storageengine.api.StandardConstraintRuleAccessor) TokenHolder(org.neo4j.token.api.TokenHolder) PropertyReceiver(org.neo4j.internal.recordstorage.TransactionRecordState.PropertyReceiver) Inject(org.neo4j.test.extension.Inject) PropertyBlock(org.neo4j.kernel.impl.store.record.PropertyBlock) ALL_RELATIONSHIPS(org.neo4j.storageengine.api.RelationshipSelection.ALL_RELATIONSHIPS) GraphDatabaseInternalSettings.counts_store_rotation_timeout(org.neo4j.configuration.GraphDatabaseInternalSettings.counts_store_rotation_timeout) OpenOption(java.nio.file.OpenOption) PropertyRecord(org.neo4j.kernel.impl.store.record.PropertyRecord) IGNORE(org.neo4j.lock.ResourceLocker.IGNORE) TransactionState(org.neo4j.kernel.api.txstate.TransactionState) CommandLockVerification(org.neo4j.internal.recordstorage.CommandLockVerification) Health(org.neo4j.monitoring.Health) PropertyKeyTokenRecord(org.neo4j.kernel.impl.store.record.PropertyKeyTokenRecord) EphemeralPageCacheExtension(org.neo4j.test.extension.pagecache.EphemeralPageCacheExtension) FIELD_NOT_PRESENT(org.neo4j.kernel.impl.store.format.standard.MetaDataRecordFormat.FIELD_NOT_PRESENT) Relationship(org.neo4j.graphdb.Relationship) ImmutableSet(org.eclipse.collections.api.set.ImmutableSet) TransactionIdStore(org.neo4j.storageengine.api.TransactionIdStore) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) DefaultIdController(org.neo4j.internal.id.DefaultIdController) DatabaseSchemaState(org.neo4j.kernel.impl.api.DatabaseSchemaState) Config(org.neo4j.configuration.Config) RecordStorageEngine(org.neo4j.internal.recordstorage.RecordStorageEngine) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) LifeSupport(org.neo4j.kernel.lifecycle.LifeSupport) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) IdGeneratorFactory(org.neo4j.internal.id.IdGeneratorFactory) Dependencies(org.neo4j.collection.Dependencies) TokenHolders(org.neo4j.token.TokenHolders) StandardConstraintRuleAccessor(org.neo4j.storageengine.api.StandardConstraintRuleAccessor)

Aggregations

DefaultIdGeneratorFactory (org.neo4j.internal.id.DefaultIdGeneratorFactory)53 StoreFactory (org.neo4j.kernel.impl.store.StoreFactory)29 BeforeEach (org.junit.jupiter.api.BeforeEach)20 Config (org.neo4j.configuration.Config)18 Test (org.junit.jupiter.api.Test)15 NeoStores (org.neo4j.kernel.impl.store.NeoStores)14 Path (java.nio.file.Path)10 PageCache (org.neo4j.io.pagecache.PageCache)10 NullLogProvider (org.neo4j.logging.NullLogProvider)10 DatabaseLayout (org.neo4j.io.layout.DatabaseLayout)9 CursorContext (org.neo4j.io.pagecache.context.CursorContext)9 IdGeneratorFactory (org.neo4j.internal.id.IdGeneratorFactory)8 IOException (java.io.IOException)7 FileSystemAbstraction (org.neo4j.io.fs.FileSystemAbstraction)6 RecordFormats (org.neo4j.kernel.impl.store.format.RecordFormats)6 TokenHolders (org.neo4j.token.TokenHolders)6 Assertions.assertTrue (org.junit.jupiter.api.Assertions.assertTrue)5 DatabaseReadOnlyChecker.writable (org.neo4j.configuration.helpers.DatabaseReadOnlyChecker.writable)5 RecoveryCleanupWorkCollector.immediate (org.neo4j.index.internal.gbptree.RecoveryCleanupWorkCollector.immediate)5 ArrayList (java.util.ArrayList)4