Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

feat: add diagnose/shards api #235

Merged
merged 3 commits into from
Sep 28, 2023

Conversation

chunshao90
Copy link
Contributor

@chunshao90 chunshao90 commented Sep 21, 2023

Rationale

Provides disgnose/shards api to check cluster shards status.

Detailed Changes

  • Refactor some code.
  • Add disgnose/shards api.
curl 0:8080/api/v1/diagnose/defaultCluster/shards
{
    "status": "success",
    "data":
    {
        "shard_not_register":
        {
            "0": "127.0.0.1:8832",
            "1": "127.0.0.1:8832",
            "5": "127.0.0.1:8832",
            "6": "127.0.0.1:8832"
        },
        "shard_not_ready":
        {}
    }
}

Test Plan

Manual test and CI.

@chunshao90 chunshao90 force-pushed the feature-debug-shard-state branch 3 times, most recently from 02c28a0 to 3ce45c7 Compare September 21, 2023 05:47
@chunshao90 chunshao90 marked this pull request as ready for review September 21, 2023 09:33
server/cluster/metadata/cluster_metadata.go Outdated Show resolved Hide resolved
server/service/http/api.go Outdated Show resolved Hide resolved
server/storage/types.go Show resolved Hide resolved
server/service/http/api.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jiacai2050 jiacai2050 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jiacai2050 jiacai2050 merged commit ba4c8e2 into apache:main Sep 28, 2023
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants