Skip to content

Commit

Permalink
chore: async remove left index should't effect query
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxxoo committed Apr 19, 2023
1 parent 7b6a4bd commit ce4f402
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
10 changes: 10 additions & 0 deletions hugegraph-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,20 @@
<version>${revision}</version>
</dependency>

<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<version>1.47.0</version>
</dependency>

<dependency>
<groupId>org.apache.hugegraph</groupId>
<artifactId>hugegraph-rpc</artifactId>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
</exclusion>
<!-- conflict with jraft -->
<exclusion>
<groupId>com.alipay.sofa</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
}
Expand Down

0 comments on commit ce4f402

Please sign in to comment.