From 8b0eb3e5e6fb79d174d270556fbfa29e263655b4 Mon Sep 17 00:00:00 2001 From: Love Kristofer Leifland Date: Thu, 31 Oct 2024 11:11:14 +0100 Subject: [PATCH] [NOID] Kernel debug flag --- build.gradle | 3 ++- core/src/main/java/apoc/warmup/Warmup.java | 2 +- test-utils/src/main/java/apoc/util/TestContainerUtil.java | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index d461a7f05..36b86d4a1 100644 --- a/build.gradle +++ b/build.gradle @@ -103,7 +103,8 @@ subprojects { 'neo4jDockerImage': project.hasProperty("neo4jDockerEeOverride") ? project.getProperty("neo4jDockerEeOverride") : 'neo4j:5.26.0-enterprise-debian', 'neo4jCommunityDockerImage': project.hasProperty("neo4jDockerCeOverride") ? project.getProperty("neo4jDockerCeOverride") : 'neo4j:5.26.0-debian', 'coreDir': 'core', - 'testDockerBundle': project.hasProperty("testDockerBundle") ? true : false + 'testDockerBundle': project.hasProperty("testDockerBundle") ? true : false, + 'org.neo4j.io.pagecache.tracing.cursor.DefaultPageCursorTracer.CHECK_REPORTED_COUNTERS': 'true' // Extra assertions in kernel maxHeapSize = "5G" forkEvery = 50 diff --git a/core/src/main/java/apoc/warmup/Warmup.java b/core/src/main/java/apoc/warmup/Warmup.java index b84d01085..95260e0e1 100644 --- a/core/src/main/java/apoc/warmup/Warmup.java +++ b/core/src/main/java/apoc/warmup/Warmup.java @@ -104,7 +104,7 @@ public Stream run( List pagedFiles = pageCache.listExistingMappings(); - Map records = pagedFiles.parallelStream() + Map records = pagedFiles.stream() .filter(pF -> { String name = pF.path().toFile().getName(); if (isSchema(pF.path().toFile()) && !loadIndexes) return false; diff --git a/test-utils/src/main/java/apoc/util/TestContainerUtil.java b/test-utils/src/main/java/apoc/util/TestContainerUtil.java index c739bb8bd..ad24f1791 100644 --- a/test-utils/src/main/java/apoc/util/TestContainerUtil.java +++ b/test-utils/src/main/java/apoc/util/TestContainerUtil.java @@ -183,6 +183,10 @@ private static Neo4jContainerExtension createNeo4jContainer( .withNeo4jConfig("dbms.logs.http.enabled", "true") .withNeo4jConfig("dbms.logs.debug.level", "DEBUG") .withNeo4jConfig("dbms.routing.driver.logging.level", "DEBUG") + // Additional kernel assertions + .withNeo4jConfig( + "server.jvm.additional", + "-Dorg.neo4j.io.pagecache.tracing.cursor.DefaultPageCursorTracer.CHECK_REPORTED_COUNTERS=true") .withFileSystemBind(logsDir.toString(), "/logs") .withFileSystemBind( canonicalPath, "/var/lib/neo4j/import") // map the "target/import" dir as the Neo4j's import dir