-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
batch update边属性失败,报错 The sort key values either be null or equal to origin when specified edge id #1442
Comments
@jzhao833 请问下请求中的edge-id是来自于哪里呢? 比如:"S1:josh>2>>S2:ripple" |
@javeme edgeId是来自于当前版本创建的边自动生成的ID,目前在请求体中去掉id字段的话是可以batchUpdate成功的,返回的id也是"id": "S1:josh>2>>S2:ripple", |
简单看了下, 似乎问题是这样:
然后你这里如果没用低版生成 id, 又没有 sortKey, 又能确定顶点 id 和边 id 都和 server 返回一致, 那快速定位的话, 可以稍后用 Arthas 动态加载一下代码, 输出一下看看系统拼接的 edgeId 是什么, 如下命令即可: # 1. 下载更新后的代码
wget -P /tmp https://raw.githubusercontent.com/hugegraph/hugegraph/467db581efb9752258682ebdb82dee9b9738e78d/hugegraph-api/src/main/java/com/baidu/hugegraph/api/graph/EdgeAPI.java
# ⬇️ Arthas 内完成下面两步 ⬇️
# 2. 重新编译
$ sc -d *EdgeAPI # 获取 classLoaderHash
$ mc -c xxx /tmp/EdgeAPI.java -d /tmp # 'xxx' 对应使用上一步获取的 hash 值
# 3. 重新加载, 然后重新测试看看输出
$ redefine /tmp/com/baidu/hugegraph/api/graph/EdgeAPI.class |
@imbajin 好的,我稍后等代码update之后试一下 |
程序拼接的地方是更新边时临时调用的, 并非从后端存储层读取的数据, 所以你查询能查到并不代表拼接就是一致的 |
最新版代码已经默认添加相关日志, 暂时关闭 issue, 期待你的新反馈再开启 |
Expected behavior 期望表现
通过
PUT http://127.0.0.1:8080/graphs/hugegraph/graph/edges/batch
批量更新边属性Actual behavior 实际表现
在edgeLabel没有sortKey的情况下报错
如果请求体里去掉id字段,是可以正常更新的
Steps to reproduce the problem 复现步骤
Specifications of environment 环境信息
The text was updated successfully, but these errors were encountered: