[Bug] 创建了uniqueIndex,使用相同id创建导致顶点,导致创建失败
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 636
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 14
Description
Note ( 特别注意, 点击展开 )
### Note ( 特别注意 ) :
> 1. 请先**搜索**, 并**确认**现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有与您相同 / 相关的问题, 请勿重复提交
> 2. 我们需要尽可能**详细**的信息来**复现**问题, 越详细的信息 (包括**日志 / 截图 / 配置**等) 会**越快**被响应和处理
> 3. Issue 标题请保持原有模板`[分类]`, 长段描述之间可以增加空行或使用`序号`标记, 保持排版清晰
> 4. 请关注提交的 issue, 缺乏信息 / 长时间 ( > 14 天) 没有回复, issue 可能会被 **关闭** (更新时会再开启)
## Environment ( 环境信息 - 必填 )
- **Server Version**: v0.11.x (refer [here](https://hugegraph.github.io/hugegraph-doc/clients/restful-api/other.html))
- **Backend**: Cassandra 3.x, x nodes, HDD or SSD
- **OS**: xx CPUs, xx G RAM, Centos 7.x
- **Data Size**: xx vertices, xx edges
## Expected behavior ( 期望表现 )
正常创建
xxx
## Actual behavior ( 实际表现 / 报错)
{
"exception": "class java.lang.IllegalArgumentException",
"message": "Unique constraint indexUniqueDataColumnGloableNameValid(id=413) conflict is found for v[3528345736695513088]",
"cause": ""
}
xxx
```java
// Error info ⬇ (尽可能详细的日志 + 完整异常栈)
```
## How to reproduce ( 复现步骤 )
1. 建立uniqueIndex,


2. 指定id创建顶点

3. 使用相同id创建不同名称顶点

此时仍然只有一个顶点,step-2创建的顶点被此次创建的数据覆盖了,

4. 使用step-2中的名称再次创建,此时会抛出异常,唯一索引冲突

**Refer:** [How to create a minimal reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example)
### Vertex/Edge example ( 问题点 / 边数据举例 )
在step2覆盖原来的数据之后,再次创建时应该是可以正常创建,2而不应该出现异常信息
```javascript
// JSON of Vertex / Edge ⬇
```
### Schema [VertexLabel, EdgeLabel, IndexLabel] ( 元数据结构 )
```javascript
// JSON of GraphSchema ⬇
```
Contributor guide
Assessment
This issue has not been assessed yet.