Skip to content

[Bug] The edge id is formatted by 5 instead of 4 parts #324

Closed

Description

@jiachengni

Bug Type (问题类型)

gremlin (结果不合预期)

Before submit

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

Environment (环境信息)

The code insert edges into the hugegraph database:

vWafer = g.V().has('Wafer','id','#WaferId#')
.fold()
.coalesce(
__.unfold(),
__.addV('Wafer').property('id','#WaferId#').property('create_on','#CreateOn#').property('born_in','ELTest')
).next();

vElDefect = g.V().has('ELDefectCategory','name', '#ElDefectName#').fold().coalesce( __.unfold(), __.addV('ELDefectCategory').property('id', UUID.randomUUID().toString()).property('name', '#ElDefectName#') ).next();

g.addE('belong_to_el_defect')
.from(vWafer)
.to(vElDefect)
.property('name','属于')
.iterate();

g.tx().commit();

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

The result shows:

"S1:178201>5>5>参数标准!3BA0>S4:239464"

The edge id has five parts instead of 4 parts, so we failed the run the LPA algorithm:

Image

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

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

Activity

  1. dosubot commented on Apr 29, 2025

    @dosubot

    Hello @jiachengni! I'm here to help you with your bug and any questions you have while you wait for a human maintainer. Let’s tackle this together!

    The issue you're encountering with the edge ID being formatted with five parts instead of the expected four is due to the structure of the edge ID in HugeGraph. The edge ID is typically composed of several components: srcVertexId, edgeLabel, sortKey, and tgtVertexId. However, the format can include additional parts such as sub-label-id and direction, leading to a five-part format [1][2].

    The IllegalStateException during the execution of the LPA algorithm is likely caused by a mismatch between the expected edge ID format and the actual format used in the algorithm. The algorithm might be expecting a different format, possibly with four parts, which does not align with HugeGraph's edge ID structure [3][4].

    To resolve this issue, you may need to adjust the algorithm's expectations or ensure that the edge ID format aligns with the expected structure. Additionally, check the configuration or logic in the WorkerInputManager and LoadService classes, as they might be contributing to the formatting issue [1].

    To continue talking to Dosu, mention @dosu.


    Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

  2. transferred this issue fromapache/hugegraphon Apr 30, 2025
  3. dosubot commented on Apr 30, 2025

    @dosubot

    The edge ID in Apache HugeGraph is correctly formatted with 5 parts for undirected edges and 6 parts for directed edges, not 4 parts. The IllegalStateException you're encountering is likely due to the LPA algorithm expecting an incorrect format of 4 parts. The edge ID format includes parts such as source vertex ID, direction (for directed edges), edge label ID, sort values, and target vertex ID [1]. You should adjust the LPA algorithm to handle edge IDs with 5 or 6 parts as per the EdgeId class specification.

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about hugegraph-computer with Dosu Add Dosu to your team

  4. imbajin commented on Apr 30, 2025

    @imbajin
    Member

    @dosu @jiachengni

    Please note the server version should < 1.5 due to the edge structure has been refactored in apache/hugegraph#2662 (I'll add a TODO for it)

    PS: we need sync the EdgeID format to let it run well in the latest version

  5. dosubot commented on Apr 30, 2025

    @dosubot

    Hey @imbajin! I'm a bot here to help with bugs, technical questions, and engineering knowledge. It looks like you're discussing server versions and edge structure changes in Apache HugeGraph. That's a bit outside my wheelhouse. If you think I should have more info on this, feel free to reach out to the Dosu Team. They'll know what to do! 😊

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about hugegraph-computer with Dosu Add Dosu to your team

  6. added theissue type on Apr 30, 2025
  7. changed the issue type fromtoon Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions