Search in sources :

Example 6 with NULL

use of org.neo4j.io.pagecache.context.CursorContext.NULL in project neo4j by neo4j.

the class ParallelNodeLabelScanTestBase method shouldScanASubsetOfNodes.

@Test
void shouldScanASubsetOfNodes() {
    try (NodeLabelIndexCursor nodes = cursors.allocateNodeLabelIndexCursor(NULL)) {
        for (int label : ALL_LABELS) {
            Scan<NodeLabelIndexCursor> scan = read.nodeLabelScan(label);
            assertTrue(scan.reserveBatch(nodes, 11));
            MutableLongList found = LongLists.mutable.empty();
            while (nodes.next()) {
                found.add(nodes.nodeReference());
            }
            assertThat(found.size()).isGreaterThan(0);
            if (label == FOO_LABEL) {
                assertTrue(FOO_NODES.containsAll(found));
                assertTrue(found.noneSatisfy(f -> BAR_NODES.contains(f)));
            } else if (label == BAR_LABEL) {
                assertTrue(BAR_NODES.containsAll(found));
                assertTrue(found.noneSatisfy(f -> FOO_NODES.contains(f)));
            } else {
                fail();
            }
        }
    }
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) TokenWrite(org.neo4j.internal.kernel.api.TokenWrite) TestUtils.concat(org.neo4j.kernel.impl.newapi.TestUtils.concat) TestUtils.randomBatchWorker(org.neo4j.kernel.impl.newapi.TestUtils.randomBatchWorker) LongLists(org.eclipse.collections.impl.factory.primitive.LongLists) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Scan(org.neo4j.internal.kernel.api.Scan) LongList(org.eclipse.collections.api.list.primitive.LongList) MutableLongList(org.eclipse.collections.api.list.primitive.MutableLongList) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) Write(org.neo4j.internal.kernel.api.Write) Future(java.util.concurrent.Future) GraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) ToLongFunction(java.util.function.ToLongFunction) ExecutorService(java.util.concurrent.ExecutorService) CursorFactory(org.neo4j.internal.kernel.api.CursorFactory) Collectors(java.util.stream.Collectors) TestUtils.assertDistinct(org.neo4j.kernel.impl.newapi.TestUtils.assertDistinct) Executors(java.util.concurrent.Executors) TestUtils.singleBatchWorker(org.neo4j.kernel.impl.newapi.TestUtils.singleBatchWorker) MutableLongSet(org.eclipse.collections.api.set.primitive.MutableLongSet) Test(org.junit.jupiter.api.Test) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) KernelException(org.neo4j.exceptions.KernelException) NodeLabelIndexCursor(org.neo4j.internal.kernel.api.NodeLabelIndexCursor) KernelTransaction(org.neo4j.kernel.api.KernelTransaction) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) LongSets(org.eclipse.collections.impl.factory.primitive.LongSets) LongSet(org.eclipse.collections.api.set.primitive.LongSet) MutableLongList(org.eclipse.collections.api.list.primitive.MutableLongList) NodeLabelIndexCursor(org.neo4j.internal.kernel.api.NodeLabelIndexCursor) Test(org.junit.jupiter.api.Test)

Example 7 with NULL

use of org.neo4j.io.pagecache.context.CursorContext.NULL in project neo4j by neo4j.

the class ParallelNodeLabelScanTestBase method shouldHandleSizeHintOverflow.

@Test
void shouldHandleSizeHintOverflow() {
    try (NodeLabelIndexCursor nodes = cursors.allocateNodeLabelIndexCursor(NULL)) {
        // when
        Scan<NodeLabelIndexCursor> scan = read.nodeLabelScan(FOO_LABEL);
        assertTrue(scan.reserveBatch(nodes, NUMBER_OF_NODES * 2));
        MutableLongList ids = LongLists.mutable.empty();
        while (nodes.next()) {
            ids.add(nodes.nodeReference());
        }
        assertEquals(FOO_NODES.size(), ids.size());
        assertTrue(FOO_NODES.containsAll(ids));
        assertTrue(ids.noneSatisfy(f -> BAR_NODES.contains(f)));
    }
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) TokenWrite(org.neo4j.internal.kernel.api.TokenWrite) TestUtils.concat(org.neo4j.kernel.impl.newapi.TestUtils.concat) TestUtils.randomBatchWorker(org.neo4j.kernel.impl.newapi.TestUtils.randomBatchWorker) LongLists(org.eclipse.collections.impl.factory.primitive.LongLists) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Scan(org.neo4j.internal.kernel.api.Scan) LongList(org.eclipse.collections.api.list.primitive.LongList) MutableLongList(org.eclipse.collections.api.list.primitive.MutableLongList) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) Write(org.neo4j.internal.kernel.api.Write) Future(java.util.concurrent.Future) GraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) ToLongFunction(java.util.function.ToLongFunction) ExecutorService(java.util.concurrent.ExecutorService) CursorFactory(org.neo4j.internal.kernel.api.CursorFactory) Collectors(java.util.stream.Collectors) TestUtils.assertDistinct(org.neo4j.kernel.impl.newapi.TestUtils.assertDistinct) Executors(java.util.concurrent.Executors) TestUtils.singleBatchWorker(org.neo4j.kernel.impl.newapi.TestUtils.singleBatchWorker) MutableLongSet(org.eclipse.collections.api.set.primitive.MutableLongSet) Test(org.junit.jupiter.api.Test) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) KernelException(org.neo4j.exceptions.KernelException) NodeLabelIndexCursor(org.neo4j.internal.kernel.api.NodeLabelIndexCursor) KernelTransaction(org.neo4j.kernel.api.KernelTransaction) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) LongSets(org.eclipse.collections.impl.factory.primitive.LongSets) LongSet(org.eclipse.collections.api.set.primitive.LongSet) MutableLongList(org.eclipse.collections.api.list.primitive.MutableLongList) NodeLabelIndexCursor(org.neo4j.internal.kernel.api.NodeLabelIndexCursor) Test(org.junit.jupiter.api.Test)

Example 8 with NULL

use of org.neo4j.io.pagecache.context.CursorContext.NULL in project neo4j by neo4j.

the class GBPTreeTest method readHeaderMustWorkWithOpenIndex.

@Test
void readHeaderMustWorkWithOpenIndex() throws Exception {
    // GIVEN
    byte[] headerBytes = new byte[12];
    random.nextBytes(headerBytes);
    Consumer<PageCursor> headerWriter = pc -> pc.putBytes(headerBytes);
    // WHEN
    try (PageCache pageCache = createPageCache(defaultPageSize);
        GBPTree<MutableLong, MutableLong> ignore = index(pageCache).with(headerWriter).build()) {
        byte[] readHeader = new byte[headerBytes.length];
        AtomicInteger length = new AtomicInteger();
        Header.Reader headerReader = headerData -> {
            length.set(headerData.limit());
            headerData.get(readHeader);
        };
        GBPTree.readHeader(pageCache, indexFile, headerReader, DEFAULT_DATABASE_NAME, NULL);
        // THEN
        assertEquals(headerBytes.length, length.get());
        assertArrayEquals(headerBytes, readHeader);
    }
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) SimpleLongLayout.longLayout(org.neo4j.index.internal.gbptree.SimpleLongLayout.longLayout) NoSuchFileException(java.nio.file.NoSuchFileException) Arrays(java.util.Arrays) PageCursor(org.neo4j.io.pagecache.PageCursor) DatabaseReadOnlyChecker.readOnly(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker.readOnly) RandomExtension(org.neo4j.test.extension.RandomExtension) CursorContext(org.neo4j.io.pagecache.context.CursorContext) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) TimeoutException(java.util.concurrent.TimeoutException) Config(org.neo4j.configuration.Config) PageSwapper(org.neo4j.io.pagecache.PageSwapper) DefaultPageCacheTracer(org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer) PF_SHARED_WRITE_LOCK(org.neo4j.io.pagecache.PagedFile.PF_SHARED_WRITE_LOCK) ByteBuffer(java.nio.ByteBuffer) PageCacheSupportExtension(org.neo4j.test.extension.pagecache.PageCacheSupportExtension) DefaultPageCursorTracer(org.neo4j.io.pagecache.tracing.cursor.DefaultPageCursorTracer) DEFAULT_DATABASE_NAME(org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME) Future(java.util.concurrent.Future) StoreChannel(org.neo4j.io.fs.StoreChannel) Pair(org.apache.commons.lang3.tuple.Pair) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) RandomRule(org.neo4j.test.rule.RandomRule) MutableLong(org.apache.commons.lang3.mutable.MutableLong) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) TestDirectoryExtension(org.neo4j.test.extension.testdirectory.TestDirectoryExtension) Path(java.nio.file.Path) PageCache(org.neo4j.io.pagecache.PageCache) ThrowingRunnable.throwing(org.neo4j.index.internal.gbptree.ThrowingRunnable.throwing) Monitor(org.neo4j.index.internal.gbptree.GBPTree.Monitor) StandardOpenOption(java.nio.file.StandardOpenOption) FileIsNotMappedException(org.neo4j.io.pagecache.impl.FileIsNotMappedException) Set(java.util.Set) TestDirectory(org.neo4j.test.rule.TestDirectory) Executors(java.util.concurrent.Executors) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) INSTANCE(org.neo4j.memory.EmptyMemoryTracker.INSTANCE) PinEvent(org.neo4j.io.pagecache.tracing.PinEvent) Sets.immutable(org.eclipse.collections.impl.factory.Sets.immutable) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Queue(java.util.Queue) MutableBoolean(org.apache.commons.lang3.mutable.MutableBoolean) DatabaseReadOnlyChecker(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker) GraphDatabaseSettings(org.neo4j.configuration.GraphDatabaseSettings) PagedFile(org.neo4j.io.pagecache.PagedFile) DELETE_ON_CLOSE(java.nio.file.StandardOpenOption.DELETE_ON_CLOSE) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Callable(java.util.concurrent.Callable) AtomicReference(java.util.concurrent.atomic.AtomicReference) NO_HEADER_READER(org.neo4j.index.internal.gbptree.GBPTree.NO_HEADER_READER) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) DelegatingPageCache(org.neo4j.io.pagecache.DelegatingPageCache) Inject(org.neo4j.test.extension.Inject) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) RegisterExtension(org.junit.jupiter.api.extension.RegisterExtension) BiConsumer(java.util.function.BiConsumer) ThrowingConsumer(org.neo4j.function.ThrowingConsumer) ByteBuffers(org.neo4j.io.memory.ByteBuffers) Math.toIntExact(java.lang.Math.toIntExact) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) LinkedList(java.util.LinkedList) ExecutorService(java.util.concurrent.ExecutorService) OutputStream(java.io.OutputStream) ByteUnit(org.neo4j.io.ByteUnit) Barrier(org.neo4j.test.Barrier) OpenOption(java.nio.file.OpenOption) IOException(java.io.IOException) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) AfterEach(org.junit.jupiter.api.AfterEach) PageCacheConfig.config(org.neo4j.test.rule.PageCacheConfig.config) EphemeralFileSystemAbstraction(org.neo4j.io.fs.EphemeralFileSystemAbstraction) CREATE(java.nio.file.StandardOpenOption.CREATE) ImmutableSet(org.eclipse.collections.api.set.ImmutableSet) DelegatingPagedFile(org.neo4j.io.pagecache.DelegatingPagedFile) FileUtils.blockSize(org.neo4j.io.fs.FileUtils.blockSize) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) PageCacheConfig(org.neo4j.test.rule.PageCacheConfig) MutableLong(org.apache.commons.lang3.mutable.MutableLong) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) PageCache(org.neo4j.io.pagecache.PageCache) DelegatingPageCache(org.neo4j.io.pagecache.DelegatingPageCache) PageCursor(org.neo4j.io.pagecache.PageCursor) Test(org.junit.jupiter.api.Test)

Example 9 with NULL

use of org.neo4j.io.pagecache.context.CursorContext.NULL in project neo4j by neo4j.

the class SeekCursorTestBase method shouldCatchupRootWhenNodeHasTooNewGenerationWhileTraversingDownTree.

@Test
void shouldCatchupRootWhenNodeHasTooNewGenerationWhileTraversingDownTree() throws Exception {
    // given
    long generation = TreeNode.generation(cursor);
    MutableBoolean triggered = new MutableBoolean(false);
    // We don't care
    long rightChild = 999;
    // a newer leaf
    long leftChild = cursor.getCurrentPageId();
    // A newer leaf
    node.initializeLeaf(cursor, stableGeneration + 1, unstableGeneration + 1);
    cursor.next();
    // a root
    long rootId = cursor.getCurrentPageId();
    node.initializeInternal(cursor, stableGeneration, unstableGeneration);
    long keyInRoot = 10L;
    node.insertKeyAndRightChildAt(cursor, key(keyInRoot), rightChild, 0, 0, stableGeneration, unstableGeneration, NULL);
    TreeNode.setKeyCount(cursor, 1);
    // with old pointer to child (simulating reuse of child node)
    node.setChildAt(cursor, leftChild, 0, stableGeneration, unstableGeneration);
    // a root catchup that records usage
    RootCatchup rootCatchup = fromId -> {
        triggered.setTrue();
        // and set child generation to match pointer
        cursor.next(leftChild);
        cursor.zapPage();
        node.initializeLeaf(cursor, stableGeneration, unstableGeneration);
        cursor.next(rootId);
        return new Root(rootId, generation);
    };
    // when
    KEY from = key(1L);
    KEY to = key(2L);
    // noinspection EmptyTryBlock
    try (SeekCursor<KEY, VALUE> ignored = new SeekCursor<>(cursor, node, from, to, layout, stableGeneration, unstableGeneration, generationSupplier, rootCatchup, unstableGeneration, exceptionDecorator, 1, LEAF_LEVEL, SeekCursor.NO_MONITOR, NULL)) {
    // do nothing
    }
    // then
    assertTrue(triggered.getValue());
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) PageCursor(org.neo4j.io.pagecache.PageCursor) LongSupplier(java.util.function.LongSupplier) RandomExtension(org.neo4j.test.extension.RandomExtension) SHARED_RESOURCE(org.neo4j.test.extension.ExecutionSharedContext.SHARED_RESOURCE) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) GenerationSafePointerPair.pointer(org.neo4j.index.internal.gbptree.GenerationSafePointerPair.pointer) ArrayList(java.util.ArrayList) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Inject(org.neo4j.test.extension.Inject) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) RandomRule(org.neo4j.test.rule.RandomRule) LEAF(org.neo4j.index.internal.gbptree.TreeNode.Type.LEAF) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) DEFAULT_MAX_READ_AHEAD(org.neo4j.index.internal.gbptree.SeekCursor.DEFAULT_MAX_READ_AHEAD) IOException(java.io.IOException) LEAF_LEVEL(org.neo4j.index.internal.gbptree.SeekCursor.LEAF_LEVEL) ResourceLock(org.junit.jupiter.api.parallel.ResourceLock) String.format(java.lang.String.format) Test(org.junit.jupiter.api.Test) Consumer(java.util.function.Consumer) List(java.util.List) INTERNAL(org.neo4j.index.internal.gbptree.TreeNode.Type.INTERNAL) ValueMergers.overwrite(org.neo4j.index.internal.gbptree.ValueMergers.overwrite) DelegatingPageCursor(org.neo4j.io.pagecache.impl.DelegatingPageCursor) NO_MONITOR(org.neo4j.index.internal.gbptree.GBPTree.NO_MONITOR) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) MutableBoolean(org.apache.commons.lang3.mutable.MutableBoolean) Collections(java.util.Collections) MutableBoolean(org.apache.commons.lang3.mutable.MutableBoolean) Test(org.junit.jupiter.api.Test)

Example 10 with NULL

use of org.neo4j.io.pagecache.context.CursorContext.NULL in project neo4j by neo4j.

the class MetaDataStoreTest method mustSupportScanningAllRecordsWithRecordCursor.

@Test
void mustSupportScanningAllRecordsWithRecordCursor() {
    MetaDataStore.Position[] positions = MetaDataStore.Position.values();
    long storeVersion = versionStringToLong(Standard.LATEST_RECORD_FORMATS.storeVersion());
    try (MetaDataStore store = newMetaDataStore()) {
        writeCorrectMetaDataRecord(store, positions, storeVersion);
    }
    List<Long> actualValues = new ArrayList<>();
    try (MetaDataStore store = newMetaDataStore()) {
        MetaDataRecord record = store.newRecord();
        try (PageCursor cursor = store.openPageCursorForReading(0, NULL)) {
            long highId = store.getHighId();
            for (long id = 0; id < highId; id++) {
                store.getRecordByCursor(id, record, RecordLoad.NORMAL, cursor);
                if (record.inUse()) {
                    actualValues.add(record.getValue());
                }
            }
        }
    }
    List<Long> expectedValues = Arrays.stream(positions).map(p -> {
        if (p == STORE_VERSION) {
            return storeVersion;
        } else {
            return p.ordinal() + 1L;
        }
    }).collect(Collectors.toList());
    assertThat(actualValues).isEqualTo(expectedValues);
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) PageCursor(org.neo4j.io.pagecache.PageCursor) CursorContext(org.neo4j.io.pagecache.context.CursorContext) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Config(org.neo4j.configuration.Config) DefaultPageCacheTracer(org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer) NullLogProvider(org.neo4j.logging.NullLogProvider) DatabaseLayout(org.neo4j.io.layout.DatabaseLayout) PageCacheSupportExtension(org.neo4j.test.extension.pagecache.PageCacheSupportExtension) UnderlyingStorageException(org.neo4j.exceptions.UnderlyingStorageException) PageCacheTracer(org.neo4j.io.pagecache.tracing.PageCacheTracer) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) STORE_VERSION(org.neo4j.kernel.impl.store.MetaDataStore.Position.STORE_VERSION) Path(java.nio.file.Path) PageCursorTracer(org.neo4j.io.pagecache.tracing.cursor.PageCursorTracer) Standard(org.neo4j.kernel.impl.store.format.standard.Standard) PageCache(org.neo4j.io.pagecache.PageCache) LAST_MISSING_STORE_FILES_RECOVERY_TIMESTAMP(org.neo4j.kernel.impl.store.MetaDataStore.Position.LAST_MISSING_STORE_FILES_RECOVERY_TIMESTAMP) FORCE(org.neo4j.kernel.impl.store.record.RecordLoad.FORCE) DatabaseReadOnlyChecker.writable(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker.writable) IOController(org.neo4j.io.pagecache.IOController) MetaDataRecord(org.neo4j.kernel.impl.store.record.MetaDataRecord) BASE_TX_COMMIT_TIMESTAMP(org.neo4j.storageengine.api.TransactionIdStore.BASE_TX_COMMIT_TIMESTAMP) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) MetaDataStore.versionStringToLong(org.neo4j.kernel.impl.store.MetaDataStore.versionStringToLong) Test(org.junit.jupiter.api.Test) List(java.util.List) EphemeralNeo4jLayoutExtension(org.neo4j.test.extension.EphemeralNeo4jLayoutExtension) LATEST_STORE_VERSION(org.neo4j.kernel.impl.store.format.standard.Standard.LATEST_STORE_VERSION) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) ExternalStoreId(org.neo4j.storageengine.api.ExternalStoreId) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Optional(java.util.Optional) Race.throwing(org.neo4j.test.Race.throwing) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) TransactionId(org.neo4j.storageengine.api.TransactionId) System.currentTimeMillis(java.lang.System.currentTimeMillis) PagedFile(org.neo4j.io.pagecache.PagedFile) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) KernelVersion(org.neo4j.kernel.KernelVersion) LogProvider(org.neo4j.logging.LogProvider) ArrayList(java.util.ArrayList) DelegatingPageCache(org.neo4j.io.pagecache.DelegatingPageCache) Inject(org.neo4j.test.extension.Inject) RegisterExtension(org.junit.jupiter.api.extension.RegisterExtension) StoreId(org.neo4j.storageengine.api.StoreId) Math.toIntExact(java.lang.Math.toIntExact) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) OpenOption(java.nio.file.OpenOption) IOException(java.io.IOException) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) AtomicLong(java.util.concurrent.atomic.AtomicLong) RecoveryCleanupWorkCollector.immediate(org.neo4j.index.internal.gbptree.RecoveryCleanupWorkCollector.immediate) AfterEach(org.junit.jupiter.api.AfterEach) PageCacheConfig.config(org.neo4j.test.rule.PageCacheConfig.config) DelegatingPageCursor(org.neo4j.io.pagecache.impl.DelegatingPageCursor) EphemeralFileSystemAbstraction(org.neo4j.io.fs.EphemeralFileSystemAbstraction) ImmutableSet(org.eclipse.collections.api.set.ImmutableSet) BitSet(java.util.BitSet) DelegatingPagedFile(org.neo4j.io.pagecache.DelegatingPagedFile) RecordLoad(org.neo4j.kernel.impl.store.record.RecordLoad) TransactionIdStore(org.neo4j.storageengine.api.TransactionIdStore) Race(org.neo4j.test.Race) SECONDS(java.util.concurrent.TimeUnit.SECONDS) MetaDataStore.versionStringToLong(org.neo4j.kernel.impl.store.MetaDataStore.versionStringToLong) AtomicLong(java.util.concurrent.atomic.AtomicLong) ArrayList(java.util.ArrayList) MetaDataRecord(org.neo4j.kernel.impl.store.record.MetaDataRecord) PageCursor(org.neo4j.io.pagecache.PageCursor) DelegatingPageCursor(org.neo4j.io.pagecache.impl.DelegatingPageCursor) Test(org.junit.jupiter.api.Test)

Aggregations

NULL (org.neo4j.io.pagecache.context.CursorContext.NULL)31 Test (org.junit.jupiter.api.Test)25 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)23 Assertions.assertTrue (org.junit.jupiter.api.Assertions.assertTrue)22 IOException (java.io.IOException)20 Inject (org.neo4j.test.extension.Inject)20 ArrayList (java.util.ArrayList)19 Assertions.assertFalse (org.junit.jupiter.api.Assertions.assertFalse)19 List (java.util.List)18 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)18 INSTANCE (org.neo4j.memory.EmptyMemoryTracker.INSTANCE)18 PageCache (org.neo4j.io.pagecache.PageCache)17 CursorContext (org.neo4j.io.pagecache.context.CursorContext)17 Assertions.assertThrows (org.junit.jupiter.api.Assertions.assertThrows)16 Path (java.nio.file.Path)15 DefaultPageCacheTracer (org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer)15 RandomRule (org.neo4j.test.rule.RandomRule)15 BeforeEach (org.junit.jupiter.api.BeforeEach)14 Config (org.neo4j.configuration.Config)14 PageCacheTracer (org.neo4j.io.pagecache.tracing.PageCacheTracer)14