incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

[Bug] Gremlin post请求不符合预期

Open chengxin1374 opened this issue 1 year ago • 1 comments

Bug Type (问题类型)

gremlin (结果不合预期)

Before submit

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

Environment (环境信息)

  • Server Version: 1.0.0 (Apache Release Version)
  • Backend: memory
  • OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x
  • Data Size: xx vertices, xx edges

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

正常的Gremlin post请求和返回如下:

post http://127.0.0.1:8080/gremlin
{
	"gremlin": "g.E('S1:marko>2>>S2:lop')",
	"bindings": {},
	"language": "gremlin-groovy",
	"aliases": {
		"graph": "hugegraph", 
		"g": "__g_hugegraph"
	}
}

返回

{
    "requestId": "68505437-7b09-46c6-abb8-5735b0415d98",
    "status": {
        "message": "",
        "code": 200,
        "attributes": {}
    },
    "result": {
        "data": [],
        "meta": {}
    }
}

但是,如果我第一次请求aliases中图名写错,比如

	"aliases": {
		"graph": "hugegraph1", 
		"g": "__g_hugegraph"
	}

返回时为:

{
    "exception": "",
    "message": "Could not rebind [graph] to [hugegraph1] as [hugegraph1] not in the Graph or TraversalSource global bindings",
    "cause": ""
}

到这里还是符合预期,问题出在这个错误请求之后,我把图的名称更正(即此时的gremlin请求是正确的),

"aliases": {
		"graph": "hugegraph", 
		"g": "__g_hugegraph"
	},

此时将会返回:

{
    "exception": "",
    "message": "refCnt: 0, decrement: 1",
    "cause": ""
}

再次请求才会正常

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

No response

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

No response

chengxin1374 avatar Aug 15 '23 03:08 chengxin1374

@imbajin maybe same with the post on hubble , "refCnt: 0, decrement: 1"

image

SunnyBoy-WYH avatar Feb 28 '24 03:02 SunnyBoy-WYH