tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stephen mallette (Jira)" <j...@apache.org>
Subject [jira] [Commented] (TINKERPOP-2286) ID type support bug causing regression when loading data
Date Mon, 19 Aug 2019 23:05:00 GMT

    [ https://issues.apache.org/jira/browse/TINKERPOP-2286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16910815#comment-16910815
] 

stephen mallette commented on TINKERPOP-2286:
---------------------------------------------

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

isn't that expected? why should {{allowId()}} return {{true}} if the instance it is testing
is not a {{String}}?

i'm not sure what the root of your problem is given your description. you could always support
numeric ids (or {{UUID}}) by coercing them to string in your implementation and then the {{(supportsNumericIds()
&& id instanceof Number)}} portion of the test would succeed and the load would work,
correct?

> ID type support bug causing regression when loading data
> --------------------------------------------------------
>
>                 Key: TINKERPOP-2286
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2286
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: structure
>    Affects Versions: 3.4.3
>         Environment: Linux
>            Reporter: Xin Wei
>            Priority: Blocker
>
> 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.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Mime
View raw message