Skip to content
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

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

Open
1 task done
shirleyStorage opened this issue Oct 11, 2024 · 4 comments · May be fixed by #2676
Open
1 task done
Labels
api Changes of API bug Something isn't working

Comments

@shirleyStorage
Copy link
Contributor

Bug Type (问题类型)

rest-api (结果不合预期)

Before submit

  • 我已经确认现有的 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: RocksDB x nodes, HDD or SSD
  • OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x
  • Data Size: xx vertices, xx edges

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_
@shirleyStorage shirleyStorage added the bug Something isn't working label Oct 11, 2024
Copy link

dosubot bot commented Oct 11, 2024

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.

@dosubot dosubot bot added the api Changes of API label Oct 11, 2024
@shirleyStorage shirleyStorage linked a pull request Oct 11, 2024 that will close this issue
11 tasks
@shirleyStorage
Copy link
Contributor Author

@dosu how to run KoutApiTest on mac

Copy link

dosubot bot commented Oct 21, 2024

To run KoutApiTest on a Mac, you need to ensure that your development environment is properly set up. Here are the general steps:

  1. Set Up the Development Environment:

    • Clone the HugeGraph repository:
      git clone https://github.com/apache/hugegraph.git
    • Follow the setup instructions for HugeGraph on macOS, which include configuring the database backend and setting up the server. You can find detailed steps here [1].
  2. Ensure Dependencies are Installed:

    • Make sure you have Java and Maven installed, as they are typically required for building and running tests in Java projects.
  3. Run the Test:

    • Navigate to the directory containing the KoutApiTest:
      cd hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/api/traversers
    • Use Maven to run the test:
      mvn test -Dtest=KoutApiTest

These steps should help you run the KoutApiTest on your Mac. If you encounter any issues, ensure that all dependencies are correctly installed and that your environment is configured as per the HugeGraph setup guidelines.

To continue talking to Dosu, mention @dosu.

@javeme
Copy link
Contributor

javeme commented Oct 27, 2024

This is the expected behavior as we designed. Can I know in what scenario you need to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Changes of API bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants