From 267ff6d3a8d5791d9481643697c757bc0cc6cf8f Mon Sep 17 00:00:00 2001 From: vaughn Date: Wed, 19 Apr 2023 21:19:01 +0800 Subject: [PATCH] chore: async remove left index shouldn't effect query (#2199) --- hugegraph-api/pom.xml | 10 ++++++++++ .../hugegraph/backend/tx/GraphTransaction.java | 14 ++++++++++++-- .../scripts/dependency/known-dependencies.txt | 13 +++++++------ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/hugegraph-api/pom.xml b/hugegraph-api/pom.xml index 50f9f3ea07..2d7370056e 100644 --- a/hugegraph-api/pom.xml +++ b/hugegraph-api/pom.xml @@ -35,10 +35,20 @@ ${revision} + + io.grpc + grpc-netty-shaded + 1.47.0 + + org.apache.hugegraph hugegraph-rpc + + io.grpc + grpc-netty-shaded + com.alipay.sofa diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java index 42673daf47..cca5e2240f 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java @@ -1725,7 +1725,12 @@ private boolean rightResultFromIndexQuery(Query query, HugeElement elem) { * Both have correct and left index, wo should return true * but also needs to cleaned up left index */ - this.indexTx.asyncRemoveIndexLeft(cq, elem); + try { + this.indexTx.asyncRemoveIndexLeft(cq, elem); + } catch (Throwable e) { + LOG.warn("Failed to remove left index for query '{}', " + + "element '{}'", cq, elem, e); + } } /* Return true if: @@ -1737,7 +1742,12 @@ private boolean rightResultFromIndexQuery(Query query, HugeElement elem) { } if (cq.optimized() == OptimizedType.INDEX) { - this.indexTx.asyncRemoveIndexLeft(cq, elem); + try { + this.indexTx.asyncRemoveIndexLeft(cq, elem); + } catch (Throwable e) { + LOG.warn("Failed to remove left index for query '{}', " + + "element '{}'", cq, elem, e); + } } return false; } diff --git a/hugegraph-dist/scripts/dependency/known-dependencies.txt b/hugegraph-dist/scripts/dependency/known-dependencies.txt index a0f955ff5f..54741be813 100644 --- a/hugegraph-dist/scripts/dependency/known-dependencies.txt +++ b/hugegraph-dist/scripts/dependency/known-dependencies.txt @@ -51,6 +51,7 @@ disruptor-3.3.7.jar eclipse-collections-11.1.0.jar eclipse-collections-api-11.1.0.jar error_prone_annotations-2.1.3.jar +error_prone_annotations-2.10.0.jar exp4j-0.4.8.jar expressions-9.0-9.0.20190305.jar fastparse_2.12-2.0.4.jar @@ -78,11 +79,11 @@ groovy-jsr223-2.5.14-indy.jar groovy-swing-2.5.14.jar groovy-templates-2.5.14.jar groovy-xml-2.5.14.jar -grpc-api-1.28.0.jar -grpc-context-1.28.0.jar -grpc-core-1.28.0.jar -grpc-netty-shaded-1.28.0.jar -gson-2.8.6.jar +grpc-api-1.47.0.jar +grpc-context-1.47.0.jar +grpc-core-1.47.0.jar +grpc-netty-shaded-1.47.0.jar +gson-2.9.0.jar guava-25.1-jre.jar hamcrest-2.2.jar hamcrest-core-1.3.jar @@ -219,7 +220,7 @@ osgi-resource-locator-1.0.3.jar parboiled-core-1.2.0.jar parboiled-scala_2.12-1.2.0.jar parser-9.0-9.0.20190305.jar -perfmark-api-0.19.0.jar +perfmark-api-0.25.0.jar picocli-4.3.2.jar postgresql-42.4.1.jar protobuf-java-3.21.7.jar