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

add server uuid in /proton/info api #731

Merged
merged 3 commits into from
May 20, 2024

Conversation

qijun-niu-timeplus
Copy link
Collaborator

PR checklist:

  • Did you run ClangFormat ?
  • Did you separate headers to a different section in existing community code base ?
  • Did you surround proton: starts/ends for new code in existing community code base ?

Please write user-readable short description of the changes:

➜  ~ curl http://localhost:8123/proton/info | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   232    0   232    0     0  29000      0 --:--:-- --:--:-- --:--:-- 29000
{
  "build": {
    "commit_sha": "c81b845b",
    "edition": "oss",
    "name": "proton",
    "time": "2024-05-16T03:19:49Z",
    "version": "v1.5.8"
  },
  "server": {
    "memory_amount": 33324388352,
    "num_of_physical_cpu_cores": 20,
    "uuid": "bdb623fe-0973-4083-8f83-7fca70a38f59"
  }
}

@@ -81,6 +82,9 @@ void PingHandler::buildResponse(const Block & block, String & resp) const

Poco::JSON::Object server_info;

const auto & server_uuid = DB::ServerUUID::get();

server_info.set("uuid", server_uuid != DB::UUIDHelpers::Nil ? DB::toString(server_uuid) : "Unknown");
Copy link
Collaborator

Choose a reason for hiding this comment

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

don't need to set unknown, Nil format is good to go

@chenziliang chenziliang merged commit 2fef910 into develop May 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants