You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by "JonSmall (via GitHub)" <gi...@apache.org> on 2025/05/08 08:44:18 UTC
[I] [Question] hubble 顶点或者属性添加后,不可删除,该怎么操作? [incubator-hugegraph]
JonSmall opened a new issue, #2761:
URL: https://github.com/apache/incubator-hugegraph/issues/2761
### Problem Type (问题类型)
None
### Before submit
- [x] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)
### Environment (环境信息)
[hubble ](hubble:1.5.0) 顶点或者属性添加后,不可删除。
显示,“当前属性数据正在使用中,不可删除。” 操作界面无法修改和删除。
就手动添加了2个节点,1条边,2个属性,改不了也删不掉,卡住了。
### Your Question (问题描述)
[hubble ](hubble:1.5.0) 顶点或者属性添加后,不可删除。
显示,“当前属性数据正在使用中,不可删除。” 操作界面无法修改和删除。
就手动添加了2个节点,1条边,2个属性,改不了也删不掉,卡住了。
### Vertex/Edge example (问题点 / 边数据举例)
```javascript
```
### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
```javascript
```
--
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
Re: [I] [Question] hubble 顶点或者属性添加后,不可删除,该怎么操作? [incubator-hugegraph]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #2761:
URL: https://github.com/apache/incubator-hugegraph/issues/2761#issuecomment-2862254895
<!-- Greeting -->
Hello @JonSmall! I'm here to help you with any bugs or questions you have while you wait for a human maintainer. If you need assistance, feel free to ask!
<!-- Answer -->
要在 Hubble 1.5.0 中删除标记为“当前属性数据正在使用中”的顶点或属性,可以使用 `delete` 方法,并将 `skip_using` 参数设置为 `true`。这样,即使属性被标记为正在使用,也可以继续删除。
以下是相关代码片段:
```java
@DeleteMapping
public void delete(@PathVariable("connId") int connId,
@RequestParam List<String> names,
@RequestParam(name = "skip_using",
defaultValue = "false")
boolean skipUsing) {
for (String name : names) {
this.service.checkExist(name, connId);
if (this.service.checkUsing(name, connId)) {
if (skipUsing) {
continue;
} else {
throw new ExternalException("schema.propertykey.in-using",
name);
}
}
this.service.remove(name, connId);
}
}
```
通过将 `skip_using` 设置为 `true`,方法将跳过对属性是否正在使用的检查,并继续进行删除操作<sup>[[1]](https://github.com/apache/incubator-hugegraph-toolchain/blob/master/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/controller/schema/PropertyKeyController.java)</sup>。
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/a978eb6a-d522-4674-8647-f0b097bc57b0?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/a978eb6a-d522-4674-8647-f0b097bc57b0?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/a978eb6a-d522-4674-8647-f0b097bc57b0?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/a978eb6a-d522-4674-8647-f0b097bc57b0?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a978eb6a-d522-4674-8647-f0b097bc57b0?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/a978eb6a-d522-4674-8647-f0b097bc57b0?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a978eb6a-d522-4674-8647-f0b097bc57b0?feedback_type=other)</sup>
--
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: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org