Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2286

ID type support bug causing regression when loading data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Workaround
    • 3.4.3
    • None
    • structure
    • None
    • Linux

    Description

      Our provider version only supports string id, however when loading data with numeric ids via g.io().read().iterate() the DB didn't error out, but assigned random ids to those vertices with numeric ids, causing regression.

      The cause is : https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java#L803 

      The allowId() method returns false when supportsStringIds() returns true and id is not instance of string. 

      Then this method: 

      https://github.com/apache/tinkerpop/blob/master/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java#L291

      will not pass id into Graph.addVertex() method, making underlying method assign internal ids to the vertex, causing regression between the data we load and the data we store in the DB.

      Attachments

        Activity

          People

            Unassigned Unassigned
            BTnoKami Xin Wei
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: