summaryrefslogtreecommitdiffstats
path: root/aai-core
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-01-20 18:16:09 +0100
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-01-20 18:16:09 +0100
commitcec75b770f280804d8c2a81fd15b054431125f96 (patch)
tree06104ba8fefb954230dd602510f524288bdddd40 /aai-core
parent0fb565350e46995aba35ae4280c77ee6c2513cb5 (diff)
Update tinkerpop to 3.2.3 in aai-core
- no not apply the InlineFilterStrategy optimisation [1] [1] the strategy aggregates consecutive has-steps into one has([...]). This messes with the container and parent query step indices that are saved while building the query. Issue-ID: AAI-3554 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I5b63ce16b8020633ea059fed7f70577661758415
Diffstat (limited to 'aai-core')
-rw-r--r--aai-core/src/main/java/org/onap/aai/serialization/engines/TransactionalGraphEngine.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/serialization/engines/TransactionalGraphEngine.java b/aai-core/src/main/java/org/onap/aai/serialization/engines/TransactionalGraphEngine.java
index 6327272b..73cdc3c8 100644
--- a/aai-core/src/main/java/org/onap/aai/serialization/engines/TransactionalGraphEngine.java
+++ b/aai-core/src/main/java/org/onap/aai/serialization/engines/TransactionalGraphEngine.java
@@ -20,10 +20,13 @@
package org.onap.aai.serialization.engines;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
@@ -149,16 +152,17 @@ public abstract class TransactionalGraphEngine {
}
public QueryBuilder<Vertex> getQueryBuilder(QueryStyle style, Loader loader) {
+ GraphTraversalSource source = this.asAdmin().getTraversalSource();
if (style.equals(QueryStyle.GREMLIN_TRAVERSAL)) {
- return new GremlinTraversal<>(loader, this.asAdmin().getTraversalSource());
+ return new GremlinTraversal<>(loader, source);
} else if (style.equals(QueryStyle.GREMLIN_UNIQUE)) {
- return new GremlinUnique<>(loader, this.asAdmin().getTraversalSource());
+ return new GremlinUnique<>(loader, source);
} else if (style.equals(QueryStyle.GREMLINPIPELINE_TRAVERSAL)) {
// return new GremlinPipelineTraversal(loader);
} else if (style.equals(QueryStyle.TRAVERSAL)) {
- return new TraversalQuery<>(loader, this.asAdmin().getTraversalSource());
+ return new TraversalQuery<>(loader, source != null ? source.withoutStrategies(InlineFilterStrategy.class) : source);
} else if (style.equals(QueryStyle.TRAVERSAL_URI)) {
- return new TraversalURIOptimizedQuery<>(loader, this.asAdmin().getTraversalSource());
+ return new TraversalURIOptimizedQuery<>(loader, source != null ? source.withoutStrategies(InlineFilterStrategy.class) : source);
} else if (style.equals(QueryStyle.HISTORY_TRAVERSAL)) {
throw new IllegalArgumentException("History Traversal needs history traversal source");
} else if (style.equals(QueryStyle.HISTORY_GREMLIN_TRAVERSAL)) {