This is an automated email from the ASF dual-hosted git repository. vaughn pushed a commit to branch zy_dev in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git
commit ba71834f3f22ce2878dc544d818510704617f09e Author: vaughn <[email protected]> AuthorDate: Mon Apr 17 15:18:56 2023 +0800 chore: async remove left index should't effect query --- .../org/apache/hugegraph/backend/tx/GraphTransaction.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 42673daf4..cca5e2240 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 @@ public class GraphTransaction extends IndexableTransaction { * 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 @@ public class GraphTransaction extends IndexableTransaction { } 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; }
