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

feat: get metasrv clusterinfo #3696

Merged
merged 10 commits into from
Apr 15, 2024

Conversation

fengjiachun
Copy link
Collaborator

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

As the title said, provide a way to get the metasrvs info:

  1. Make that each Metasrv node registers candidate information upon startup, sets the key (__metasrv_election_candidates/{address}), and keeps it alive every 300 seconds. The key will be delete when no keep lease.
  2. Let the cluster client can get this information via gRPC service

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@fengjiachun fengjiachun requested a review from WenyXu April 11, 2024 16:19
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 11, 2024
src/meta-srv/src/election/etcd.rs Outdated Show resolved Hide resolved
src/meta-srv/src/election/etcd.rs Show resolved Hide resolved
src/meta-srv/src/metasrv.rs Show resolved Hide resolved
Copy link

codecov bot commented Apr 12, 2024

Codecov Report

Attention: Patch coverage is 3.90244% with 197 lines in your changes are missing coverage. Please review.

Project coverage is 85.06%. Comparing base (02f806f) to head (4347804).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3696      +/-   ##
==========================================
- Coverage   85.57%   85.06%   -0.51%     
==========================================
  Files         957      963       +6     
  Lines      159226   160622    +1396     
==========================================
+ Hits       136258   136637     +379     
- Misses      22968    23985    +1017     

src/common/meta/src/cluster.rs Outdated Show resolved Hide resolved
src/meta-client/src/client.rs Outdated Show resolved Hide resolved
src/meta-client/src/client.rs Outdated Show resolved Hide resolved
src/meta-client/src/client/cluster.rs Show resolved Hide resolved
src/meta-srv/src/election/etcd.rs Show resolved Hide resolved
src/meta-srv/src/election/etcd.rs Outdated Show resolved Hide resolved
fengjiachun and others added 4 commits April 15, 2024 14:34
Co-authored-by: dennis zhuang <killme2008@gmail.com>
Co-authored-by: dennis zhuang <killme2008@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Co-authored-by: dennis zhuang <killme2008@gmail.com>
Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

LGTM.

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun enabled auto-merge April 15, 2024 07:58
@tisonkun tisonkun added this pull request to the merge queue Apr 15, 2024
Merged via the queue into GreptimeTeam:main with commit 8779524 Apr 15, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants