apache / incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
https://hugegraph.apache.org
Apache License 2.0
2.63k stars 517 forks source link

[Bug] Can not delete vertex labels when use standalone mode and set server.role=computer #2675

Open shirleyStorage opened 2 days ago

shirleyStorage commented 2 days ago

Bug Type (问题类型)

rest-api (结果不合预期)

Before submit

Environment (环境信息)

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

curl -X POST http://localhost:8080/graphs/hugegraph/schema/propertykeys \
-H "Content-Type: application/json" \
-d '
{
    "name": "name",
    "data_type": "TEXT",
    "cardinality": "SINGLE"
}
';

curl -X POST http://localhost:8080/graphs/hugegraph/schema/propertykeys \
-H "Content-Type: application/json" \
-d '
{
    "name": "age",
    "data_type": "INT",
    "cardinality": "SINGLE"
}
';

curl -X POST http://localhost:8080/graphs/hugegraph/schema/vertexlabels \
     -H "Content-Type: application/json" \
     -d '{
    "name": "person",
    "id_strategy": "DEFAULT",
    "properties": [
        "name",
        "age"
    ],
    "primary_keys": [
        "name"
    ],
    "nullable_keys": [],
    "enable_label_index": true
}
';

curl -X DELETE http://localhost:8080/graphs/hugegraph/schema/vertexlabels/person ;

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

curl -X DELETE http://localhost:8080/graphs/hugegraph/schema/vertexlabels/person

return :

Can't schedule task on non-master server


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

_No response_
dosubot[bot] commented 2 days ago

You can't delete vertex labels in standalone mode with server.role set to computer because the server is not a master. In HugeGraph, tasks like deleting vertex labels must be scheduled on a master server. The error message "Can't schedule task on non-master server" indicates that the operation is being attempted on a non-master server, which is not allowed [1][2].

To continue talking to Dosu, mention @dosu.