You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/06/13 01:58:27 UTC

[GitHub] [incubator-hugegraph] Ckuangf opened a new issue, #1900: [Bug] gremlin查询结果不符合预期

Ckuangf opened a new issue, #1900:
URL: https://github.com/apache/incubator-hugegraph/issues/1900

   ### Bug Type (问题类型)
   
   gremlin (结果不合预期)
   
   ### Before submit
   
   - [X] 我已经确认现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有相同 / 重复问题
   
   ### Environment (环境信息)
   
   - Server Version: v0.11.x
   - Backend: RocksDB x nodes, HDD or SSD 
   - OS: xx CPUs, xx G RAM, Centos 7.x 
   - Data Size:  xx vertices, xx edges <!-- (like 1000W 点, 9000W 边) -->
   
   
   ### Expected & Actual behavior (期望与实际表现)
   
   
   实际上在一度查询时正常,二度查询时只能查出来单条路径:
   使用数据 huge中构造的点边数据如下:
   ![image](https://user-images.githubusercontent.com/31173360/173264718-c8d943ec-bad7-49c7-86e9-969694cd26ec.png)
   二度查询时,只能查询出来第二条路径:
   ![image](https://user-images.githubusercontent.com/31173360/173264822-9b391b0b-8d95-4264-8496-476000ddc637.png)
   一度查询时,可以查询出来路径一和路径二
   ![image](https://user-images.githubusercontent.com/31173360/173264919-6a477cba-17aa-4751-9e17-b510b3ce35e4.png)
   
   期望可以正常查询出2条路径
   
   实际上通过gremliny验证gremlin语句时:
   一度查询:
   ![image](https://user-images.githubusercontent.com/31173360/173265806-c5df6ab3-e7cc-4642-bf8c-7b7e21f3c1e6.png)
   二度查询 两条结果正常查询出来:
   ![image](https://user-images.githubusercontent.com/31173360/173265920-229fa87d-5cc1-4599-841a-6ecb58c68577.png)
   
   gremliny地址:
   https://gremlify.com/ida02brvl5/1
   gremliny 构造数据:
   g.addV('Vertex').as('1').
     addV('Vertex').as('2').
     addV('Vertex').as('3').
     addV('Vertex').as('4').
     addE('child').from('1').to('2').addE('child').
     from('2').to('3').addE('child').from('4').
     to('3')
   查询语句:
   g.V(2853).repeat(inE("child").outV().simplePath()).until(or(inE().count().is(0),loops().is(eq(2)))).path()
   
   
   任意类似的点边关系在huge中查询结果一致,二度查询时均会缺失只有一度结果那条路径
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   _No response_
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] javeme commented on issue #1900: [Bug] gremlin查询结果不符合预期

Posted by GitBox <gi...@apache.org>.
javeme commented on issue #1900:
URL: https://github.com/apache/incubator-hugegraph/issues/1900#issuecomment-1154065586

   我这边使用`inE().count().is(0)`方式的查询结果如下:
   ```json
   {
       "requestId": "32f89c6f-a8cf-4717-baed-0a8631684adf",
       "status": {
           "message": "",
           "code": 200,
           "attributes": {
           }
       },
       "result": {
           "data": [
               {
                   "labels": [],
                   "objects": [
                       {
                           "id": 3,
                           "label": "node",
                           "type": "vertex",
                           "properties": {
                           }
                       },
                       {
                           "id": "L4>1>>L3",
                           "label": "child",
                           "type": "edge",
                           "outV": 4,
                           "outVLabel": "node",
                           "inV": 3,
                           "inVLabel": "node",
                           "properties": {
                           }
                       },
                       {
                           "id": 4,
                           "label": "node",
                           "type": "vertex",
                           "properties": {
                           }
                       }
                   ]
               },
               {
                   "labels": [],
                   "objects": [
                       {
                           "id": 3,
                           "label": "node",
                           "type": "vertex",
                           "properties": {
                           }
                       },
                       {
                           "id": "L2>1>>L3",
                           "label": "child",
                           "type": "edge",
                           "outV": 2,
                           "outVLabel": "node",
                           "inV": 3,
                           "inVLabel": "node",
                           "properties": {
                           }
                       },
                       {
                           "id": 2,
                           "label": "node",
                           "type": "vertex",
                           "properties": {
                           }
                       },
                       {
                           "id": "L1>1>>L2",
                           "label": "child",
                           "type": "edge",
                           "outV": 1,
                           "outVLabel": "node",
                           "inV": 2,
                           "inVLabel": "node",
                           "properties": {
                           }
                       },
                       {
                           "id": 1,
                           "label": "node",
                           "type": "vertex",
                           "properties": {
                           }
                       }
                   ]
               }
           ],
           "meta": {
           }
       }
   }
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] imbajin commented on issue #1900: [Bug] gremlin查询结果不符合预期

Posted by GitBox <gi...@apache.org>.
imbajin commented on issue #1900:
URL: https://github.com/apache/incubator-hugegraph/issues/1900#issuecomment-1153760368

   是的, 可以用 rest-api 里的对比一下, 可以更快排除和定位问题 (当然基于最新server是更好)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] Ckuangf commented on issue #1900: [Bug] gremlin查询结果不符合预期

Posted by GitBox <gi...@apache.org>.
Ckuangf commented on issue #1900:
URL: https://github.com/apache/incubator-hugegraph/issues/1900#issuecomment-1153501631

   > 感谢提供信息, 有试过用 kneighbor 接口 (POST 版, 可带 path) 尝试查询2度路径, 看看是否也有同样问题么?
   > 
   > 另外版本是最新的 0.12-release 么
   
    使用的是0.11.2版本,   有试过用 kneighbor 接口 (POST 版, 可带 path)   这个接口指的是使用restAPI进行查询的接口么


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] imbajin commented on issue #1900: [Bug] gremlin查询结果不符合预期

Posted by GitBox <gi...@apache.org>.
imbajin commented on issue #1900:
URL: https://github.com/apache/incubator-hugegraph/issues/1900#issuecomment-1153397929

   感谢提供信息, 有试过用 kneighbor 接口 (POST 版, 可带 path) 尝试查询2度路径, 看看是否也有同样问题么?
   
   另外版本是最新的 0.12-release 么


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] Ckuangf commented on issue #1900: [Bug] gremlin查询结果不符合预期

Posted by GitBox <gi...@apache.org>.
Ckuangf commented on issue #1900:
URL: https://github.com/apache/incubator-hugegraph/issues/1900#issuecomment-1154776159

   感谢


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] javeme commented on issue #1900: [Bug] gremlin查询结果不符合预期

Posted by GitBox <gi...@apache.org>.
javeme commented on issue #1900:
URL: https://github.com/apache/incubator-hugegraph/issues/1900#issuecomment-1154058976

   请使用规范语句查询:
   ```java
   // 注意是 inE().count().is(0),而非 inE().is(0)
   g.V(3).repeat(inE('child').outV().simplePath())
         .until(or(inE().count().is(0),loops().is(eq(2))))
         .path()
   ```
   
   整理了一下示例数据:
   ```java
   schema=graph.schema();
   schema.vertexLabel('node').useCustomizeNumberId().create();
   schema.edgeLabel('child').sourceLabel('node').targetLabel('node').create();
   
   g.addV('node').property(id, 1).as('1')
    .addV('node').property(id, 2).as('2')
    .addV('node').property(id, 3).as('3')
    .addV('node').property(id, 4).as('4')
    .addE('child').from('1').to('2')
    .addE('child').from('2').to('3')
    .addE('child').from('4').to('3')
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] Ckuangf closed issue #1900: [Bug] gremlin查询结果不符合预期

Posted by GitBox <gi...@apache.org>.
Ckuangf closed issue #1900: [Bug] gremlin查询结果不符合预期
URL: https://github.com/apache/incubator-hugegraph/issues/1900


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org