Skip to content

[Bug] gremlin return wrong data #3023

@neoblackcap

Description

@neoblackcap

Bug Type (问题类型)

gremlin (结果不合预期)

Before submit

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

Environment (环境信息)

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

Expected & Actual behavior (期望与实际表现)

使用g.E().hasLabel("depend_on").has("cdb_id", 439)查询边数据,depend_on EdgeLabel已经对cdb_id字段创建Sencondary索引
返回

[
  {
    "id": "L1118501289353805824>4>4>>L1118497440656261120",
    "label": "depend_on",
    "source": "1118501289353805824",
    "target": "1118497440656261120",
    "properties": {
      "productname": "鸡鲜粉调味料",
      "cdb_id": 442,
      "menuid": "10522",
      "process_step": 4,
      "doorder": 4,
      "productid": "YHGYL-GT1146"
    }
  }
]

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

[
  {
    "id": "L1118501289353805824>4>4>>L1118497440656261120",
    "label": "depend_on",
    "source": "1118501289353805824",
    "target": "1118497440656261120",
    "properties": {
      "productname": "鸡鲜粉调味料",
      "cdb_id": 442,
      "menuid": "10522",
      "process_step": 4,
      "doorder": 4,
      "productid": "YHGYL-GT1146"
    }
  }
]

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

// edge labels
{
    "edgelabels": [
        {
            "id": 4,
            "name": "depend_on",
            "edgelabel_type": "NORMAL",
            "source_label": "doway",
            "target_label": "doway",
            "links": [
                {
                    "doway": "doway"
                }
            ],
            "frequency": "SINGLE",
            "sort_keys": [],
            "nullable_keys": [],
            "index_labels": [
                "depend_on_cdb_id_index",
                "depend_on_menuid_index"
            ],
            "properties": [
                "productname",
                "cdb_id",
                "menuid",
                "process_step",
                "doorder",
                "productid"
            ],
            "status": "CREATED",
            "ttl": 0,
            "enable_label_index": true,
            "user_data": {
                "~create_time": "2026-05-11 09:44:24.594"
            }
        }
    ]
}
// index labels

{
    "indexlabels": [
        {
            "id": 4,
            "name": "doway_dowayid_index",
            "base_type": "VERTEX_LABEL",
            "base_value": "doway",
            "index_type": "SECONDARY",
            "fields": [
                "dowayid"
            ],
            "status": "CREATED",
            "user_data": {
                "~create_time": "2026-05-11 09:44:24.782"
            }
        },
        {
            "id": 5,
            "name": "depend_on_cdb_id_index",
            "base_type": "EDGE_LABEL",
            "base_value": "depend_on",
            "index_type": "SECONDARY",
            "fields": [
                "cdb_id"
            ],
            "status": "CREATED",
            "user_data": {
                "~create_time": "2026-05-11 09:44:24.851"
            }
        },
        {
            "id": 6,
            "name": "depend_on_menuid_index",
            "base_type": "EDGE_LABEL",
            "base_value": "depend_on",
            "index_type": "SECONDARY",
            "fields": [
                "menuid"
            ],
            "status": "CREATED",
            "user_data": {
                "~create_time": "2026-05-11 09:44:24.911"
            }
        },
        {
            "id": 7,
            "name": "doway_kind_index",
            "base_type": "VERTEX_LABEL",
            "base_value": "doway",
            "index_type": "SECONDARY",
            "fields": [
                "kind"
            ],
            "status": "CREATED",
            "user_data": {
                "~create_time": "2026-05-11 09:49:27.407"
            }
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggremlinTinkerPop gremlin

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions