Skip to content

[查询异常]post请求进行gremlin 查询异常 (rocksdb存储后端) #1331

Closed

Description

@DoubleBabylol

Expected behavior 期望表现

使用get和post,查询同一条gremlin,结果应该一致

Actual behavior 实际表现

使用post请求查询带path()的gremlin,返回结果异常,均为{"empty":false,"simple":true}

Steps to reproduce the problem 复现步骤

1. post请求查询body:

//api
http://ip:8080/graphs/xgraph/jobs/gremlin
//body
 {"gremlin": "g.V().hasLabel('file', 'network').has('uid', within(180550774,2653739512)).aggregate('x').in('drop', 'visit').path().by('uid')", "bindings": {}, "language": "gremlin-groovy"}

通过taskid查询结果,关注返回值task_result,均为{"empty":false,"simple":true}
image

2. 通过get请求查询同一条gremlin:

//api
http://ip:8080/gremlin?gremlin=xgraph.traversal().V().hasLabel('file').has('uid', within(180550774,2653739512)).in().path()

结果
image

3.使用其他gremlin语句查询path():

get:

image

post查询同一条gremlin语句,仍为异常结果
image

Specifications of environment 环境信息

  • hugegraph version: {0.11}
  • hugegraph backend: {rocksdb}

Activity

  1. changed the title [-][查询异常]post请求进行gremlin 查询path()异常 (rocksdb存储后端)[/-] [+][查询异常]post请求进行gremlin 查询异常 (rocksdb存储后端)[/+] on Jan 13, 2021
  2. javeme commented on Jan 14, 2021

    @javeme
    Contributor

    @DoubleBabylol 需要对task_result字符串进行json二次解析。

  3. DoubleBabylol commented on Jan 15, 2021

    @DoubleBabylol
    Author

    @javeme 作者你好,要怎样解析呢,并不是斜杠/ 的问题,即使解析task_result 也仅仅是将 {'empty': False, 'simple': True}转换为{'empty': False, 'simple': True} ,实际需要的是返回正常的业务json数据 目前需要去掉对path的查询才能够返回正常的业务数据

  4. suifeng9 commented on Jan 19, 2021

    @suifeng9

    在压缩和解压缩异步任务的结果时,使用 LZ4 替代 Gzip(hugegraph #1198)
    请问如何用LZ4解压返回数据

  5. javeme commented on Jan 22, 2021

    @javeme
    Contributor

    @tido914 具体可参考源代码

  6. javeme commented on Jan 22, 2021

    @javeme
    Contributor

    @DoubleBabylol 不好意思,之前没有看清楚问题,现在明确了问题是post返回的路径在系列化时不正确,我们会分析原因并解决,确认下版本号是0.11对吗?

  7. 1436516871 commented on Jan 22, 2021

    @1436516871

    @javeme 已确认,0.11版本存在此问题,这个bad case我们会加入到回归测试用例里。
    @DoubleBabylol 稍后我们相关同学会解决这个问题。

  8. DoubleBabylol commented on Jan 26, 2021

    @DoubleBabylol
    Author

    好的 感谢

  9. added a commit that references this issue on Jan 30, 2021
    ff228e1
  10. javeme commented on Mar 29, 2021

    @javeme
    Contributor

    0.11的最新版本 v0.11.2-b2 补丁包 已解决该问题。

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 working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions