From fd375ac7e5ce9e859038467702e397f4094dac6b Mon Sep 17 00:00:00 2001 From: Paul Horn Date: Mon, 30 Sep 2024 12:20:30 +0200 Subject: [PATCH] Remove 5.22 compatibility Co-authored-by: Mats Rydberg --- build.gradle | 1 - .../5.22/neo4j-kernel-adapter/build.gradle | 22 - .../gds/compat/_522/BatchImporterCompat.java | 439 ------------------ .../compat/_522/Neo4jProxyFactoryImpl.java | 44 -- .../neo4j/gds/compat/_522/Neo4jProxyImpl.java | 195 -------- gradle/dependencies.gradle | 4 - .../neo4j/gds/compat/Neo4jVersionLookup.java | 2 +- settings.gradle | 2 - .../gds/junit/annotation/Neo4jVersion.java | 1 - 9 files changed, 1 insertion(+), 709 deletions(-) delete mode 100644 compatibility/5.22/neo4j-kernel-adapter/build.gradle delete mode 100644 compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/BatchImporterCompat.java delete mode 100644 compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/Neo4jProxyFactoryImpl.java delete mode 100644 compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/Neo4jProxyImpl.java diff --git a/build.gradle b/build.gradle index b816b79b61..141b90b6d0 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,6 @@ ext { compatibilityModules = [ 'kernel-adapter': [ - project(':neo4j-kernel-adapter-5.22'), project(':neo4j-kernel-adapter-5.23'), project(':neo4j-kernel-adapter-5.24'), ] diff --git a/compatibility/5.22/neo4j-kernel-adapter/build.gradle b/compatibility/5.22/neo4j-kernel-adapter/build.gradle deleted file mode 100644 index ec3de36c15..0000000000 --- a/compatibility/5.22/neo4j-kernel-adapter/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ - -apply plugin: 'java-library' - -description = 'Neo4j Graph Data Science :: Neo4j Kernel Adapter 5.22' - -group = 'org.neo4j.gds' - -dependencies { - annotationProcessor project(':annotations') - annotationProcessor group: 'org.neo4j', name: 'annotations', version: neos.'5.22' - annotationProcessor openGds.immutables.value - - compileOnly project(':annotations') - compileOnly openGds.immutables.value.annotations - neodeps().each { - compileOnly(group: 'org.neo4j', name: it, version: neos.'5.22') { - transitive = false - } - } - - implementation project(':neo4j-kernel-adapter-api') -} diff --git a/compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/BatchImporterCompat.java b/compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/BatchImporterCompat.java deleted file mode 100644 index f0fdf96a21..0000000000 --- a/compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/BatchImporterCompat.java +++ /dev/null @@ -1,439 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.gds.compat._522; - -import org.neo4j.configuration.Config; -import org.neo4j.gds.compat.batchimport.BatchImporter; -import org.neo4j.gds.compat.batchimport.ImportConfig; -import org.neo4j.gds.compat.batchimport.InputIterable; -import org.neo4j.gds.compat.batchimport.InputIterator; -import org.neo4j.gds.compat.batchimport.Monitor; -import org.neo4j.gds.compat.batchimport.input.Collector; -import org.neo4j.gds.compat.batchimport.input.Estimates; -import org.neo4j.gds.compat.batchimport.input.Group; -import org.neo4j.gds.compat.batchimport.input.IdType; -import org.neo4j.gds.compat.batchimport.input.Input; -import org.neo4j.gds.compat.batchimport.input.InputChunk; -import org.neo4j.gds.compat.batchimport.input.InputEntityVisitor; -import org.neo4j.gds.compat.batchimport.input.ReadableGroups; -import org.neo4j.internal.batchimport.AdditionalInitialIds; -import org.neo4j.internal.batchimport.IndexConfig; -import org.neo4j.internal.batchimport.input.Collectors; -import org.neo4j.internal.batchimport.input.Groups; -import org.neo4j.io.fs.FileSystemAbstraction; -import org.neo4j.io.layout.DatabaseLayout; -import org.neo4j.io.pagecache.context.CursorContextFactory; -import org.neo4j.io.pagecache.tracing.PageCacheTracer; -import org.neo4j.kernel.impl.index.schema.IndexImporterFactoryImpl; -import org.neo4j.kernel.impl.transaction.log.files.TransactionLogInitializer; -import org.neo4j.logging.internal.LogService; -import org.neo4j.memory.EmptyMemoryTracker; -import org.neo4j.scheduler.JobScheduler; -import org.neo4j.storageengine.api.StorageEngineFactory; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; -import java.nio.charset.StandardCharsets; - -public final class BatchImporterCompat { - - private BatchImporterCompat() {} - - static BatchImporter instantiateBatchImporter( - DatabaseLayout dbLayout, - FileSystemAbstraction fileSystem, - ImportConfig config, - Monitor monitor, - LogService logService, - Config dbConfig, - JobScheduler jobScheduler, - Collector badCollector - ) { - var storageEngineFactory = StorageEngineFactory.selectStorageEngine(dbConfig); - var progressOutput = new PrintStream(PrintStream.nullOutputStream(), true, StandardCharsets.UTF_8); - var verboseProgressOutput = false; - - var importer = storageEngineFactory.batchImporter( - dbLayout, - fileSystem, - PageCacheTracer.NULL, - new ConfigurationAdapter(config), - logService, - progressOutput, - verboseProgressOutput, - AdditionalInitialIds.EMPTY, - dbConfig, - new MonitorAdapter(monitor), - jobScheduler, - badCollector != null ? ((CollectorAdapter) badCollector).delegate : null, - TransactionLogInitializer.getLogFilesInitializer(), - new IndexImporterFactoryImpl(), - EmptyMemoryTracker.INSTANCE, - CursorContextFactory.NULL_CONTEXT_FACTORY - ); - return new BatchImporterReverseAdapter(importer); - } - - private static final class MonitorAdapter implements org.neo4j.internal.batchimport.Monitor { - private final Monitor delegate; - - private MonitorAdapter(Monitor delegate) {this.delegate = delegate;} - - @Override - public void started() { - delegate.started(); - } - - @Override - public void percentageCompleted(int percentage) { - delegate.percentageCompleted(percentage); - } - - @Override - public void completed(boolean success) { - delegate.completed(success); - } - } - - static final class ConfigurationAdapter implements org.neo4j.internal.batchimport.Configuration { - private final ImportConfig inner; - - ConfigurationAdapter(ImportConfig inner) { - this.inner = inner; - } - - @Override - public int batchSize() { - return this.inner.batchSize(); - } - - @Override - public int maxNumberOfWorkerThreads() { - return this.inner.writeConcurrency(); - } - - @Override - public boolean highIO() { - return this.inner.highIO(); - } - - @Override - public IndexConfig indexConfig() { - var config = IndexConfig.DEFAULT; - if (this.inner.createLabelIndex()) { - config = config.withLabelIndex(); - } - if (this.inner.createRelationshipTypeIndex()) { - config = config.withRelationshipTypeIndex(); - } - return config; - } - } - - static final class BatchImporterReverseAdapter implements BatchImporter { - private final org.neo4j.internal.batchimport.BatchImporter delegate; - - BatchImporterReverseAdapter(org.neo4j.internal.batchimport.BatchImporter delegate) {this.delegate = delegate;} - - @Override - public void doImport(Input input) throws IOException { - delegate.doImport(new InputAdapter(input)); - } - } - - static final class InputAdapter implements org.neo4j.internal.batchimport.input.Input { - private final Input delegate; - - InputAdapter(Input delegate) {this.delegate = delegate;} - - @Override - public org.neo4j.internal.batchimport.InputIterable nodes(org.neo4j.internal.batchimport.input.Collector collector) { - return new InputIterableAdapter(delegate.nodes()); - } - - @Override - public org.neo4j.internal.batchimport.InputIterable relationships(org.neo4j.internal.batchimport.input.Collector collector) { - return new InputIterableAdapter(delegate.relationships()); - } - - @Override - public org.neo4j.internal.batchimport.input.IdType idType() { - return adaptIdType(delegate.idType()); - } - - @Override - public org.neo4j.internal.batchimport.input.ReadableGroups groups() { - return adaptReadableGroups(delegate.groups()); - } - - @Override - public Estimates calculateEstimates(org.neo4j.internal.batchimport.input.PropertySizeCalculator propertySizeCalculator) - throws IOException { - return adaptEstimates(delegate.calculateEstimates()); - } - - @Override - public void close() { - delegate.close(); - } - } - - static final class InputIterableAdapter implements org.neo4j.internal.batchimport.InputIterable { - private final InputIterable delegate; - - InputIterableAdapter(InputIterable delegate) {this.delegate = delegate;} - - @Override - public org.neo4j.internal.batchimport.InputIterator iterator() { - return new InputIteratorAdapter(delegate.iterator()); - } - } - - static final class InputIteratorAdapter implements org.neo4j.internal.batchimport.InputIterator { - private final InputIterator delegate; - - InputIteratorAdapter(InputIterator delegate) {this.delegate = delegate;} - - @Override - public org.neo4j.internal.batchimport.input.InputChunk newChunk() { - return new InputChunkAdapter(delegate.newChunk()); - } - - @Override - public boolean next(org.neo4j.internal.batchimport.input.InputChunk inputChunk) throws IOException { - return delegate.next(((InputChunkAdapter) inputChunk).delegate); - } - - @Override - public void close() throws IOException { - delegate.close(); - } - } - - private static final class InputChunkAdapter implements org.neo4j.internal.batchimport.input.InputChunk { - private final InputChunk delegate; - - private InputChunkAdapter(InputChunk delegate) {this.delegate = delegate;} - - @Override - public boolean next(org.neo4j.internal.batchimport.input.InputEntityVisitor inputEntityVisitor) - throws IOException { - return delegate.next(new InputEntityVisitorReverseAdapter(inputEntityVisitor)); - } - - @Override - public void close() throws IOException { - delegate.close(); - } - } - - private static final class InputEntityVisitorReverseAdapter implements InputEntityVisitor { - private final org.neo4j.internal.batchimport.input.InputEntityVisitor delegate; - - InputEntityVisitorReverseAdapter(org.neo4j.internal.batchimport.input.InputEntityVisitor delegate) {this.delegate = delegate;} - - @Override - public boolean property(String s, Object o) { - return delegate.property(s, o); - } - - @Override - public boolean id(long l) { - return delegate.id(l); - } - - @Override - public boolean id(long id, Group group) { - return delegate.id(id, ((GroupReverseAdapter) group).delegate); - } - - @Override - public boolean id(String id, Group group) { - return delegate.id(id, ((GroupReverseAdapter) group).delegate); - } - - @Override - public boolean labels(String[] strings) { - return delegate.labels(strings); - } - - @Override - public boolean startId(long l) { - return delegate.startId(l); - } - - @Override - public boolean startId(long id, Group group) { - return delegate.startId(id, ((GroupReverseAdapter) group).delegate); - } - - @Override - public boolean startId(String id, Group group) { - return delegate.startId(id, ((GroupReverseAdapter) group).delegate); - } - - @Override - public boolean endId(long l) { - return delegate.endId(l); - } - - @Override - public boolean endId(long id, Group group) { - return delegate.endId(id, ((GroupReverseAdapter) group).delegate); - } - - @Override - public boolean endId(String id, Group group) { - return delegate.endId(id, ((GroupReverseAdapter) group).delegate); - } - - @Override - public boolean type(String s) { - return delegate.type(s); - } - - @Override - public void endOfEntity() throws IOException { - delegate.endOfEntity(); - } - - @Override - public void reset() { - delegate.reset(); - } - - @Override - public void close() throws IOException { - delegate.close(); - } - } - - private static Group adaptGroup(org.neo4j.internal.batchimport.input.Group group) { - return new GroupReverseAdapter(group); - } - - private static final class GroupReverseAdapter implements Group { - private final org.neo4j.internal.batchimport.input.Group delegate; - - private GroupReverseAdapter(org.neo4j.internal.batchimport.input.Group delegate) {this.delegate = delegate;} - } - - private static org.neo4j.internal.batchimport.input.IdType adaptIdType(IdType idType) { - return switch (idType) { - case ACTUAL -> org.neo4j.internal.batchimport.input.IdType.ACTUAL; - case INTEGER -> org.neo4j.internal.batchimport.input.IdType.INTEGER; - case STRING -> org.neo4j.internal.batchimport.input.IdType.STRING; - }; - } - - private static org.neo4j.internal.batchimport.input.ReadableGroups adaptReadableGroups(ReadableGroups groups) { - return groups == null || groups == ReadableGroups.EMPTY - ? org.neo4j.internal.batchimport.input.ReadableGroups.EMPTY - : ((ReadableGroupsReverseAdapter) groups).delegate; - } - - private static ReadableGroups adaptReadableGroups(org.neo4j.internal.batchimport.input.ReadableGroups groups) { - return groups == null || groups == org.neo4j.internal.batchimport.input.ReadableGroups.EMPTY - ? ReadableGroups.EMPTY - : new ReadableGroupsReverseAdapter(groups); - } - - private static class ReadableGroupsReverseAdapter implements ReadableGroups { - private final org.neo4j.internal.batchimport.input.ReadableGroups delegate; - - ReadableGroupsReverseAdapter(org.neo4j.internal.batchimport.input.ReadableGroups delegate) {this.delegate = delegate;} - - @Override - public Group getGlobalGroup() { - return adaptGroup(delegate.get(null)); - } - } - - private static org.neo4j.internal.batchimport.input.Input.Estimates adaptEstimates(Estimates estimates) { - return estimates == null || estimates == Estimates.NULL - ? NULL_ESTIMATES - : ((EstimatesAdapter) estimates).delegate; - } - - static ReadableGroups newGroups() { - return adaptReadableGroups(new Groups()); - } - - static ReadableGroups newInitializedGroups() { - var groups = new Groups(); - groups.getOrCreate(null); - return adaptReadableGroups(groups); - } - - static Collector emptyCollector() { - return CollectorAdapter.EMPTY; - } - - static Collector badCollector(OutputStream outputStream, int batchSize) { - return new CollectorAdapter(Collectors.badCollector(outputStream, batchSize)); - } - - private static final class CollectorAdapter implements Collector { - private static final Collector EMPTY = new CollectorAdapter(org.neo4j.internal.batchimport.input.Collector.EMPTY); - - private final org.neo4j.internal.batchimport.input.Collector delegate; - - CollectorAdapter(org.neo4j.internal.batchimport.input.Collector delegate) { - this.delegate = delegate; - } - } - - private static final org.neo4j.internal.batchimport.input.Input.Estimates NULL_ESTIMATES = - org.neo4j.internal.batchimport.input.Input.knownEstimates(0, 0, 0, 0, 0, 0, 0); - - static Estimates knownEstimates( - long numberOfNodes, - long numberOfRelationships, - long numberOfNodeProperties, - long numberOfRelationshipProperties, - long sizeOfNodeProperties, - long sizeOfRelationshipProperties, - long numberOfNodeLabels - ) { - if (numberOfNodes == 0 && numberOfRelationships == 0 && numberOfNodeProperties == 0 - && numberOfRelationshipProperties == 0 && sizeOfNodeProperties == 0 && sizeOfRelationshipProperties == 0 - && numberOfNodeLabels == 0) { - return Estimates.NULL; - } - return new EstimatesAdapter(org.neo4j.internal.batchimport.input.Input.knownEstimates( - numberOfNodes, - numberOfRelationships, - numberOfNodeProperties, - numberOfRelationshipProperties, - sizeOfNodeProperties, - sizeOfRelationshipProperties, - numberOfNodeLabels - )); - } - - private static final class EstimatesAdapter implements Estimates { - private final org.neo4j.internal.batchimport.input.Input.Estimates delegate; - - EstimatesAdapter(org.neo4j.internal.batchimport.input.Input.Estimates delegate) { - this.delegate = delegate; - } - } -} diff --git a/compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/Neo4jProxyFactoryImpl.java b/compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/Neo4jProxyFactoryImpl.java deleted file mode 100644 index fa50e907d8..0000000000 --- a/compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/Neo4jProxyFactoryImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.gds.compat._522; - -import org.neo4j.annotations.service.ServiceProvider; -import org.neo4j.gds.compat.Neo4jProxyApi; -import org.neo4j.gds.compat.Neo4jProxyFactory; -import org.neo4j.gds.compat.Neo4jVersion; - -@ServiceProvider -public final class Neo4jProxyFactoryImpl implements Neo4jProxyFactory { - - @Override - public boolean canLoad(Neo4jVersion version) { - return version.matches(5, 22); - } - - @Override - public Neo4jProxyApi load() { - return new Neo4jProxyImpl(); - } - - @Override - public String description() { - return "Neo4j 5.22"; - } -} diff --git a/compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/Neo4jProxyImpl.java b/compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/Neo4jProxyImpl.java deleted file mode 100644 index 709afcba38..0000000000 --- a/compatibility/5.22/neo4j-kernel-adapter/src/main/java/org/neo4j/gds/compat/_522/Neo4jProxyImpl.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) "Neo4j" - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.gds.compat._522; - -import org.neo4j.collection.RawIterator; -import org.neo4j.configuration.Config; -import org.neo4j.dbms.api.DatabaseNotFoundException; -import org.neo4j.exceptions.KernelException; -import org.neo4j.gds.annotation.SuppressForbidden; -import org.neo4j.gds.compat.CompatCallableProcedure; -import org.neo4j.gds.compat.Neo4jProxyApi; -import org.neo4j.gds.compat.batchimport.BatchImporter; -import org.neo4j.gds.compat.batchimport.ImportConfig; -import org.neo4j.gds.compat.batchimport.Monitor; -import org.neo4j.gds.compat.batchimport.input.Collector; -import org.neo4j.gds.compat.batchimport.input.Estimates; -import org.neo4j.gds.compat.batchimport.input.ReadableGroups; -import org.neo4j.internal.kernel.api.exceptions.ProcedureException; -import org.neo4j.internal.kernel.api.procs.ProcedureSignature; -import org.neo4j.io.fs.FileSystemAbstraction; -import org.neo4j.io.layout.DatabaseLayout; -import org.neo4j.kernel.api.ResourceMonitor; -import org.neo4j.kernel.api.exceptions.Status; -import org.neo4j.kernel.api.procedure.CallableProcedure; -import org.neo4j.kernel.api.procedure.Context; -import org.neo4j.kernel.impl.query.QueryExecutionKernelException; -import org.neo4j.logging.internal.LogService; -import org.neo4j.scheduler.JobScheduler; -import org.neo4j.values.AnyValue; -import org.neo4j.values.SequenceValue; - -import java.io.OutputStream; - -import static org.neo4j.internal.helpers.collection.Iterators.asRawIterator; - -public final class Neo4jProxyImpl implements Neo4jProxyApi { - - @Override - public BatchImporter instantiateBatchImporter( - DatabaseLayout dbLayout, - FileSystemAbstraction fileSystem, - ImportConfig config, - Monitor monitor, - LogService logService, - Config dbConfig, - JobScheduler jobScheduler, - Collector badCollector - ) { - return BatchImporterCompat.instantiateBatchImporter( - dbLayout, - fileSystem, - config, - monitor, - logService, - dbConfig, - jobScheduler, - badCollector - ); - } - - @Override - public ReadableGroups newGroups() { - return BatchImporterCompat.newGroups(); - } - - @Override - public ReadableGroups newInitializedGroups() { - return BatchImporterCompat.newInitializedGroups(); - } - - @Override - public Collector emptyCollector() { - return BatchImporterCompat.emptyCollector(); - } - - @Override - public Collector badCollector(OutputStream outputStream, int batchSize) { - return BatchImporterCompat.badCollector(outputStream, batchSize); - } - - @Override - public Estimates knownEstimates( - long numberOfNodes, - long numberOfRelationships, - long numberOfNodeProperties, - long numberOfRelationshipProperties, - long sizeOfNodeProperties, - long sizeOfRelationshipProperties, - long numberOfNodeLabels - ) { - return BatchImporterCompat.knownEstimates( - numberOfNodes, - numberOfRelationships, - numberOfNodeProperties, - numberOfRelationshipProperties, - sizeOfNodeProperties, - sizeOfRelationshipProperties, - numberOfNodeLabels - ); - } - - @Override - public void rethrowUnlessDuplicateRegistration(ProcedureException e) throws KernelException { - if (e.status() == Status.Procedure.ProcedureRegistrationFailed && e.getMessage().contains("already in use")) { - return; - } - throw e; - } - - @Override - public CallableProcedure callableProcedure(CompatCallableProcedure procedure) { - @SuppressForbidden(reason = "This is the compat API") - final class CallableProcedureImpl implements CallableProcedure { - private final CompatCallableProcedure procedure; - - private CallableProcedureImpl(CompatCallableProcedure procedure) { - this.procedure = procedure; - } - - @Override - public ProcedureSignature signature() { - return this.procedure.signature(); - } - - @Override - public RawIterator apply( - Context ctx, - AnyValue[] input, - ResourceMonitor resourceMonitor - ) throws ProcedureException { - return asRawIterator(this.procedure.apply(ctx, input)); - } - } - - return new CallableProcedureImpl(procedure); - } - - @Override - public int sequenceSizeAsInt(SequenceValue sequenceValue) { - return sequenceValue.length(); - } - - @Override - public AnyValue sequenceValueAt(SequenceValue sequenceValue, int index) { - return sequenceValue.value(index); - } - - @Override - public RuntimeException queryExceptionAsRuntimeException(Throwable throwable) { - if (throwable instanceof RuntimeException) { - return (RuntimeException) throwable; - } else if (throwable instanceof QueryExecutionKernelException) { - return ((QueryExecutionKernelException) throwable).asUserException(); - } else { - return new RuntimeException(throwable); - } - } - - @Override - public ProcedureException procedureCallFailed(String message, Object... args) { - return new ProcedureException(Status.Procedure.ProcedureCallFailed, message, args); - } - - @Override - public ProcedureException procedureCallFailed(Throwable reason, String message, Object... args) { - return new ProcedureException(Status.Procedure.ProcedureCallFailed, reason, message, args); - } - - @Override - public String exceptionMessage(Throwable e) { - return e.getMessage(); - } - - @Override - public DatabaseNotFoundException databaseNotFoundException(String message) { - throw new DatabaseNotFoundException(message); - } -} diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index c0e6fd3362..8ca6b4bf03 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -1,6 +1,5 @@ ext { neos = [ - '5.22': properties.getOrDefault('neo4jVersion522', '5.22.0'), '5.23': properties.getOrDefault('neo4jVersion523', '5.23.0'), '5.24': properties.getOrDefault('neo4jVersion524', '5.24.0'), '5.25': properties.getOrDefault('neo4jVersion525', '5.25.0-SNAPSHOT'), @@ -10,21 +9,18 @@ ext { neo4j_minor = properties.getOrDefault('neo4jVersion', neo4jDefault).toString().split('\\.')[0..1].join('.') scalas = [ - '5.22': '2.13.11', '5.23': '2.13.11', '5.24': '2.13.11', '5.25': '2.13.11', ] log4js = [ - '5.22': '2.20.0', '5.23': '2.20.0', '5.24': '2.20.0', '5.25': '2.20.0', ] shiros = [ - '5.22': '2.0.0', '5.23': '2.0.0', '5.24': '2.0.0', '5.25': '2.0.1', diff --git a/neo4j-adapter/src/main/java/org/neo4j/gds/compat/Neo4jVersionLookup.java b/neo4j-adapter/src/main/java/org/neo4j/gds/compat/Neo4jVersionLookup.java index 2b1af55cfe..a77a7c18b7 100644 --- a/neo4j-adapter/src/main/java/org/neo4j/gds/compat/Neo4jVersionLookup.java +++ b/neo4j-adapter/src/main/java/org/neo4j/gds/compat/Neo4jVersionLookup.java @@ -55,7 +55,7 @@ static Neo4jVersion findNeo4jVersion() { } private static final int SUPPORTED_MAJOR_VERSION = 5; - private static final int MIN_SUPPORTED_MINOR_VERSION = 22; + private static final int MIN_SUPPORTED_MINOR_VERSION = 23; @VisibleForTesting static Neo4jVersion parse(CharSequence version, String fullVersion) { diff --git a/settings.gradle b/settings.gradle index 0030306681..df3ce37845 100644 --- a/settings.gradle +++ b/settings.gradle @@ -367,8 +367,6 @@ project(':path-finding-params').projectDir = file('algo-params/path-finding-para -include('neo4j-kernel-adapter-5.22') -project(':neo4j-kernel-adapter-5.22').projectDir = file('compatibility/5.22/neo4j-kernel-adapter') include('neo4j-kernel-adapter-5.23') project(':neo4j-kernel-adapter-5.23').projectDir = file('compatibility/5.23/neo4j-kernel-adapter') diff --git a/test-utils/src/main/java/org/neo4j/gds/junit/annotation/Neo4jVersion.java b/test-utils/src/main/java/org/neo4j/gds/junit/annotation/Neo4jVersion.java index 67c65beefb..5a735d2e67 100644 --- a/test-utils/src/main/java/org/neo4j/gds/junit/annotation/Neo4jVersion.java +++ b/test-utils/src/main/java/org/neo4j/gds/junit/annotation/Neo4jVersion.java @@ -21,7 +21,6 @@ @SuppressWarnings("all") // squelch checkstyle public enum Neo4jVersion { - V_5_22(22), V_5_23(23), V_5_24(24), V_5_25(25),