Skip to content

Commit

Permalink
Dev fix for procedure handlers (#4283)
Browse files Browse the repository at this point in the history
* Remove stored map of Procedure Handlers (#4278)

Co-authored-by: vga91 <[email protected]>
  • Loading branch information
gem-neo4j and vga91 authored Dec 10, 2024
1 parent d6b31c3 commit 16ff77f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apoc-core
Submodule apoc-core updated 45 files
+2 −2 .github/actions/setup-jdk/action.yaml
+126 −0 .github/workflows/traceability-comments-trigger.yaml
+4 −5 .github/workflows/traceability-comments.yaml
+16 −16 build.gradle
+4 −3 common/build.gradle
+11 −0 common/src/main/java/apoc/ApocExtensionFactory.java
+2 −1 common/src/main/java/apoc/export/util/MetaInformation.java
+11 −3 common/src/main/java/apoc/export/util/NodesAndRelsSubGraph.java
+1 −1 common/src/main/java/apoc/export/util/ProgressReporter.java
+18 −0 common/src/main/java/apoc/result/CypherStatementMapResult.java
+18 −0 common/src/main/java/apoc/result/DataProgressInfo.java
+18 −10 common/src/main/java/apoc/util/LogsUtil.java
+0 −35 common/src/main/java/apoc/util/QueryUtil.java
+3 −1 common/src/test/resources/init_neo4j_export_csv.cypher
+1 −1 core/build.gradle
+35 −32 core/src/main/java/apoc/cypher/CypherInitializer.java
+8 −6 core/src/main/java/apoc/export/csv/CsvFormat.java
+18 −0 core/src/main/java/apoc/export/csv/CustomCSVWriter.java
+37 −28 core/src/main/java/apoc/help/Help.java
+871 −0 core/src/main/java/apoc/help/HelpUtil.java
+7 −3 core/src/main/java/apoc/load/LoadJson.java
+7 −1 core/src/main/java/apoc/path/PathExplorer.java
+72 −16 core/src/main/java/apoc/schema/Schemas.java
+25 −0 core/src/test/java/apoc/export/arrow/ArrowTest.java
+30 −0 core/src/test/java/apoc/export/csv/ExportCsvTest.java
+254 −33 core/src/test/java/apoc/export/cypher/ExportCypherTest.java
+17 −0 core/src/test/java/apoc/path/ExpandPathTest.java
+88 −1 core/src/test/java/apoc/schema/SchemasTest.java
+5 −3 core/src/test/java/apoc/util/LogsUtilTest.java
+0 −44 core/src/test/java/apoc/util/QueryUtilTest.java
+3 −3 core/src/test/resources/procedures.json
+ gradle/wrapper/gradle-wrapper.jar
+2 −1 gradle/wrapper/gradle-wrapper.properties
+17 −12 gradlew
+131 −6 it/src/test/java/apoc/it/core/ExportCypherEnterpriseFeaturesTest.java
+18 −0 it/src/test/java/apoc/it/core/PeriodicIterateTest.java
+43 −7 it/src/test/java/apoc/it/core/StartupTest.java
+38 −6 processor/src/main/java/apoc/processor/ApocProcessor.java
+21 −5 processor/src/main/java/apoc/processor/ExtensionClassWriter.java
+23 −5 processor/src/main/java/apoc/processor/SignatureVisitor.java
+85 −49 processor/src/test/java/apoc/processor/ApocProcessorTest.java
+14 −9 processor/src/test/java/apoc/processor/ProcedureSignatureVisitorTest.java
+14 −9 processor/src/test/java/apoc/processor/UserAggregationFunctionSignatureVisitorTest.java
+14 −9 processor/src/test/java/apoc/processor/UserFunctionSignatureVisitorTest.java
+5 −4 readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import apoc.uuid.Uuid;
import apoc.uuid.UuidHandler;
import org.neo4j.annotations.service.ServiceProvider;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.kernel.availability.AvailabilityListener;
import org.neo4j.kernel.internal.GraphDatabaseAPI;
import org.neo4j.kernel.lifecycle.Lifecycle;
Expand All @@ -17,25 +16,20 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@ServiceProvider
public class ExtendedApocGlobalComponents implements ApocGlobalComponents {

private final Map<GraphDatabaseService,CypherProceduresHandler> cypherProcedureHandlers = new ConcurrentHashMap<>();

@Override
public Map<String, Lifecycle> getServices(GraphDatabaseAPI db, ApocExtensionFactory.Dependencies dependencies) {


CypherProceduresHandler cypherProcedureHandler = new CypherProceduresHandler(
db,
dependencies.scheduler(),
dependencies.apocConfig(),
dependencies.log().getUserLog(CypherProcedures.class),
dependencies.globalProceduresRegistry()
);
cypherProcedureHandlers.put(db, cypherProcedureHandler);

return Map.of(

Expand Down Expand Up @@ -66,7 +60,6 @@ public Collection<Class> getContextClasses() {

@Override
public Iterable<AvailabilityListener> getListeners(GraphDatabaseAPI db, ApocExtensionFactory.Dependencies dependencies) {
CypherProceduresHandler cypherProceduresHandler = cypherProcedureHandlers.get(db);
return cypherProceduresHandler==null ? Collections.emptyList() : Collections.singleton(cypherProceduresHandler);
return Collections.emptyList();
}
}

0 comments on commit 16ff77f

Please sign in to comment.