Skip to content

Commit

Permalink
Remove stored map of Procedure Handlers (#4278)
Browse files Browse the repository at this point in the history
* Update to behave differently for APOC extended

---------

Co-authored-by: vga91 <[email protected]>
  • Loading branch information
gem-neo4j and vga91 committed Dec 10, 2024
1 parent d6b31c3 commit bf3a001
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ "dev" ]
branches: [ "dev", "5.26" ]
pull_request:
branches: [ "dev" ]
branches: [ "dev", "5.26" ]

env:
CODEARTIFACT_DOWNLOAD_URL: ${{ secrets.CODEARTIFACT_DOWNLOAD_URL }}
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "apoc-core"]
path = apoc-core
url = https://github.com/neo4j/apoc
branch = dev
branch = 5.26
2 changes: 1 addition & 1 deletion apoc-core
Submodule apoc-core updated 28 files
+126 −0 .github/workflows/traceability-comments-trigger.yaml
+3 −4 .github/workflows/traceability-comments.yaml
+11 −0 common/src/main/java/apoc/ApocExtensionFactory.java
+11 −3 common/src/main/java/apoc/export/util/NodesAndRelsSubGraph.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
+35 −32 core/src/main/java/apoc/cypher/CypherInitializer.java
+18 −0 core/src/main/java/apoc/export/csv/CustomCSVWriter.java
+23 −5 core/src/main/java/apoc/help/Help.java
+72 −16 core/src/main/java/apoc/schema/Schemas.java
+254 −33 core/src/test/java/apoc/export/cypher/ExportCypherTest.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
+131 −6 it/src/test/java/apoc/it/core/ExportCypherEnterpriseFeaturesTest.java
+18 −0 it/src/test/java/apoc/it/core/PeriodicIterateTest.java
+41 −7 it/src/test/java/apoc/it/core/StartupTest.java
+37 −5 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
+2 −1 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 bf3a001

Please sign in to comment.