javeme commented on issue #2062:
URL: 
https://github.com/apache/incubator-hugegraph/issues/2062#issuecomment-1375960811

   找到了问题的原因是未加载顶点属性:
   ```json
   {
   "exception": "java.lang.IllegalStateException",
   "message": "Non-null property 'isUngrouped(id=27)' is null for 
'v[677313912013586432]'",
   "cause": "[java.lang.IllegalStateException]",
   "trace":[
   "java.lang.IllegalStateException: Non-null property 'isUngrouped(id=27)' is 
null for 'v[677313912013586432]'",
   "\tat 
com.google.common.base.Preconditions.checkState(Preconditions.java:531)",
   "\tat org.apache.hugegraph.util.E.checkState(E.java:68)",
   "\tat 
org.apache.hugegraph.backend.tx.GraphIndexTransaction.updateIndex(GraphIndexTransaction.java:213)",
   "\tat 
org.apache.hugegraph.backend.tx.GraphIndexTransaction.updateVertexIndex(GraphIndexTransaction.java:167)",
   "\tat 
org.apache.hugegraph.backend.tx.GraphTransaction.prepareDeletions(GraphTransaction.java:403)",
   "\tat 
org.apache.hugegraph.backend.tx.GraphTransaction.prepareCommit(GraphTransaction.java:306)",
   "\tat 
org.apache.hugegraph.backend.tx.IndexableTransaction.commit2Backend(IndexableTransaction.java:53)",
   "\tat 
org.apache.hugegraph.backend.tx.AbstractTransaction.commit(AbstractTransaction.java:238)",
   "\tat 
org.apache.hugegraph.backend.tx.GraphTransaction.commit(GraphTransaction.java:510)",
   "\tat 
org.apache.hugegraph.StandardHugeGraph$Txs.commit(StandardHugeGraph.java:1489)",
   "\tat 
org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.doCommit(StandardHugeGraph.java:1351)",
   "\tat 
org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.commit(AbstractTransaction.java:104)",
   "\tat 
org.apache.hugegraph.StandardHugeGraph$TinkerPopTransaction.commit(StandardHugeGraph.java:1317)",
   "\tat 
org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.lambda$commitAll$1(DefaultGraphManager.java:136)",
   "\tat 
java.util.concurrent.ConcurrentHashMap$EntrySetView.forEach(ConcurrentHashMap.java:4793)",
   "\tat 
org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.commitAll(DefaultGraphManager.java:133)",
   "\tat 
org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler.attemptCommit(HttpGremlinEndpointHandler.java:335)",
   "\tat 
org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler.lambda$channelRead$1(HttpGremlinEndpointHandler.java:227)",
   "\tat 
org.apache.tinkerpop.gremlin.util.function.FunctionUtils.lambda$wrapFunction$0(FunctionUtils.java:36)",
   "\tat 
org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:278)",
   "\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)",
   "\tat 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)",
   "\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)",
   "\tat 
org.apache.hugegraph.auth.HugeGraphAuthProxy$ContextTask.run(HugeGraphAuthProxy.java:1862)",
   "\tat 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)",
   "\tat 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)",
   "\tat java.lang.Thread.run(Thread.java:750)"
   ]
   ```
   
   解决方法:
   可以在 `GraphIndexTransaction.updateIndex()` 
中的205行增加`element.forceLoad()`强制加载下属性:
   
https://github.com/apache/incubator-hugegraph/blob/d340420341ede1eeb7d36f6e7f7cfdc386844ed6/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphIndexTransaction.java#L213


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to