incubator-hugegraph: [Question] The number of edges I queried is inconsistent with the number of edges I imported

Problem Type (问题类型)

others (please edit later)

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

  • Server Version: 1.0.0 (Apache Release Version)
  • Backend: RocksDB x nodes, HDD or SSD
  • OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x
  • Data Size: 65608366 vertices, 1806067135 edges

Your Question (问题描述)

I imported 65608366 vertices and 1806067135 edges. When I used hugegraph-computer or gremlin to query, the number of query edges was correct.

However, when I used “hugeClient.traverser().iteratorEdges(shard, 500)” to query the number of edges for each shard, and finally accumulated it, I found that there was an additional number of edges (1806312225 at this time). I don’t know why the numbers were inconsistent. Can’t we use “hugeClient. traverer(). iteratorEdges” to obtain the data size of all edges?

hugegraph-computer log: image

gremlin result: image

“hugeClient.traverser().iteratorEdges(shard, 500)” detail: Step 1:Query all shards information (http://x.x.x.x:8065/graphs/hugegraph/traversers/edges/shards?split_size=1048576) Step 2:Use “hugeClient. traverser(). iteratorEdges” to obtain the number of edges for each shard and then sum them。 result: Number of edges is 1806312225 , not 1806067135 .

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

{
    "vertexlabels": [
        {
            "id": 1,
            "name": "person",
            "id_strategy": "CUSTOMIZE_NUMBER",
            "primary_keys": [],
            "nullable_keys": [],
            "index_labels": [
                "personByAge"
            ],
            "properties": [
                "id"
            ],
            "status": "CREATED",
            "ttl": 0,
            "enable_label_index": true,
            "user_data": {
                "~create_time": "2023-03-13 09:52:29.084"
            }
        }
    ]
}

{
    "edgelabels": [
        {
            "id": 1,
            "name": "friend",
            "source_label": "person",
            "target_label": "person",
            "frequency": "SINGLE",
            "sort_keys": [],
            "nullable_keys": [],
            "index_labels": [],
            "properties": [],
            "status": "CREATED",
            "ttl": 0,
            "enable_label_index": true,
            "user_data": {
                "~create_time": "2023-03-13 09:52:30.760"
            }
        }
    ]
}

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

please note the ‘count (-1)’ may mean .limit(-1).count()