[BUG] Failed to run complex queries in 6000s in sf10k graph
- Dominant language
- C++
- Stars
- 3.6k
- Forks
- 468
- Avg merge
- 29m
- Merged PRs (30d)
- 1
Description
Failed to run complex queries in 6000s for sf10k graph.
To reproduce:
```python
import os
from graphscope.framework.loader import Loader
from gremlin_python.driver.client import Client
import graphscope as gs
gs.set_option(show_log=True)
HOST_PATH = "/mnt/siyuan"
k8s_volumes = {
"data": {
"type": "hostPath",
"field": {"path": HOST_PATH, "type": "Directory"},
"mounts": {"mountPath": "/data", "command": "/usr/bin/chmod 666 /data "},
}
}
sess = gs.session(
num_workers=1,
with_dataset=False,
preemptive=True,
k8s_image_registry="",
k8s_image_tag="latest",
k8s_image_pull_policy="IfNotPresent",
k8s_engine_cpu=8,
k8s_engine_mem="100Gi",
vineyard_shared_mem="80Gi",
k8s_volumes=k8s_volumes,
enabled_engines="analytical, interactive",
)
vertex_path = HOST_PATH + "/social-network-sf10-projected-fk/VertexFile/"
edge_path = HOST_PATH + "/social-network-sf10-projected-fk/EdgeFile/"
vertex_path_in_pod = vertex_path.replace(HOST_PATH, "/data")
edge_path_in_pod = edge_path.replace(HOST_PATH, "/data")
vertex_file = os.listdir(vertex_path)
edge_file = os.listdir(edge_path)
vertices = {}
edges = {}
for i in vertex_file:
vertex_label = os.path.splitext(i)[0]
vertices[vertex_label] = {"loader": Loader(vertex_path_in_pod + i, delimiter="|")}
for i in edge_file:
edge_label = os.path.splitext(i)[0]
src = edge_label.split("_")[0]
dst = edge_label.split("_")[2]
edges[edge_label] = {
"loader": Loader(edge_path_in_pod + i, delimiter="|"),
"source": [0, src],
"destination": [1, dst],
}
graph = sess.load_from(edges=edges, vertices=vertices)
interactive = gs.gremlin(graph, params={"pegasus.timeout": 600000})
result = interactive.execute("g.V().hasLabel('Person').count()").one()
print(result)
gremlin_query = """g.V().match(__.as('forum').out('Forum_hasMember_Person').as('person'),
__.as('person').out('Person_isLocatedIn_City').as('city'),
__.as('city').out('City_isPartOf_Country').as('country'),
__.as('forum').out('Forum_containerOf_Post').as('post'),
__.as('post').in('Comment_replyOf_Post').as('comment'),
__.as('comment').out('Comment_hasTag_Tag').as('tag'),
__.as('tag').out('Tag_hasType_TagClass').as('tagClass'))"""
# TODO: count() timeout after 10 minutes
graph_url = interactive.graph_url[0]
client = Client(graph_url, "g")
ret = []
q = client.submit(query)
while True:
try:
ret.extend(q.next())
print('.', end="")
except StopIteration:
break
print("All work complete")
print(len(ret))
```
From my observation, it continues to push some data to `ret`, but never end in 6000s.
If I add `count()` in the end of the query, it will not return, seems not finished.
Contributor guide
Assessment
This issue has not been assessed yet.