gpt4 book ai didi

python - 海王星内部故障异常 : Can not get the attachable from the host vertex

转载 作者:太空宇宙 更新时间:2023-11-03 21:43:05 26 4
gpt4 key购买 nike

我正在使用 neptune 的图形数据库以及通过 python 进行的 gremlin 查询,将地址存储在数据库中。大多数查询执行良好,但是一旦我尝试以下查询,海王星就会返回内部失败异常:

g.V(address).outE('isPartOf').inV().
dedup().as_('groupNode').
inE('isPartOf').outV().dedup().as_('children').
addE('isPartOf').to(group).
select('groupNode').drop().
fold().
coalesce(__.unfold(),
g.V(address).addE('isPartOf').to(group)).next()

每个地址都有可能属于一个组。本地址已经分配给一个组时,我尝试获取分配给该组的所有地址并将它们分配给一个新组,同时删除旧组。如果地址尚未分配给组,我只想立即将地址分配给新组。

如果我自己尝试这个查询,一切都会完美执行(尽管查询有点慢)。但是,一旦我尝试在更多地址上并行执行此查询,此查询就会失败并出现以下错误:

Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 804, in __bootstrap_inner
self.run()
File "gremlinExample.py", line 30, in run
processTx(self.tx, self.g, self.parentBlock)
File "gremlinExample.py", line 152, in processTx
g.V(address).outE('isPartOf').inV().dedup().as_('groupNode').inE('isPartOf').outV().dedup().as_('children').select('children').addE('isPartOf').to(group).select('groupNode').drop().fold().coalesce(__.unfold(), g.V(address).addE('isPartOf').to(group)).next()
File "/home/ec2-user/.local/lib/python2.7/site-packages/gremlin_python/process/traversal.py", line 70, in next
return self.__next__()
File "/home/ec2-user/.local/lib/python2.7/site-packages/gremlin_python/process/traversal.py", line 43, in __next__
self.traversal_strategies.apply_strategies(self)
File "/home/ec2-user/.local/lib/python2.7/site-packages/gremlin_python/process/traversal.py", line 346, in apply_strategies
traversal_strategy.apply(traversal)
File "/home/ec2-user/.local/lib/python2.7/site-packages/gremlin_python/driver/remote_connection.py", line 143, in apply
remote_traversal = self.remote_connection.submit(traversal.bytecode)
File "/home/ec2-user/.local/lib/python2.7/site-packages/gremlin_python/driver/driver_remote_connection.py", line 54, in submit
results = result_set.all().result()
File "/usr/lib/python2.7/site-packages/concurrent/futures/_base.py", line 405, in result
return self.__get_result()
File "/usr/lib/python2.7/site-packages/concurrent/futures/_base.py", line 357, in __get_result
raise type(self._exception), self._exception, self._traceback
GremlinServerError: 500: {"requestId":"a42015b7-6b22-4bd1-9e7d-e3252e8f3ab6","code":"InternalFailureException","detailedMessage":"Can not get the attachable from the host vertex: v[64b32957-ef71-be47-c8d7-0109cfc4d9fd]-/->neptunegraph[org.apache.commons.configuration.PropertiesConfiguration@6db0f02]"}

据我所知,并行执行应该不是问题,因为每个查询都只是在数据库中排队(正是出于这个原因,我尝试创建一个立即执行整个任务的查询)。

任何英语不好的借口,它不是我的母语

最佳答案

对于在这里寻找更新的任何人 - OP 能够通过用 .iterate() 替换 .next() 来解决问题。需要进行一些后续工作才能更好地理解查询和数据,但 OP 已放弃该项目并转向另一个解决方案。

关于python - 海王星内部故障异常 : Can not get the attachable from the host vertex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52698115/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com