You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by va...@apache.org on 2023/04/17 07:19:34 UTC

[incubator-hugegraph] branch zy_dev created (now ba71834f3)

This is an automated email from the ASF dual-hosted git repository.

vaughn pushed a change to branch zy_dev
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git


      at ba71834f3 chore: async remove left index should't effect query

This branch includes the following new commits:

     new ba71834f3 chore: async remove left index should't effect query

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-hugegraph] 01/01: chore: async remove left index should't effect query

Posted by va...@apache.org.
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 <va...@apache.org>
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;
     }