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

Change discoverer client to broadcast to read replicas #2276

Merged
merged 14 commits into from
Jan 19, 2024

Conversation

ykadowak
Copy link
Contributor

@ykadowak ykadowak commented Dec 20, 2023

Description:

This PR implements

  1. add read_replica_client configuration
  2. change discoverer client to broadcast to read replicas
    GetReadReplica() round robins across primary client and read replica clients.

Will add E2E tests in another PR.

Related Issue:

Versions:

  • Go Version: 1.21.5
  • Docker Version: 20.10.8
  • Kubernetes Version: v1.28.4
  • NGT Version: 2.1.6

Checklist:

Special notes for your reviewer:

@vdaas-ci
Copy link
Collaborator

[WARNING:INTCFG] Changes in interal/config may require you to change Helm charts. Please check.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

deepsource-autofix bot added a commit that referenced this pull request Dec 20, 2023
This commit fixes the style issues introduced in 0e3b1ea according to the output
from Gofumpt and Prettier.

Details: #2276
Copy link

cloudflare-workers-and-pages bot commented Dec 20, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 115d09a
Status: ✅  Deploy successful!
Preview URL: https://a49e96b9.vald.pages.dev
Branch Preview URL: https://feature-readreplica-client.vald.pages.dev

View logs

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: 49 lines in your changes are missing coverage. Please review.

Comparison is base (306f0ef) 30.11% compared to head (115d09a) 30.13%.

Files Patch % Lines
internal/config/lb.go 0.00% 13 Missing ⚠️
internal/client/v1/client/discoverer/option.go 0.00% 10 Missing ⚠️
internal/client/v1/client/discoverer/discover.go 68.18% 7 Missing ⚠️
pkg/gateway/lb/service/gateway.go 0.00% 7 Missing ⚠️
pkg/gateway/lb/handler/grpc/handler.go 0.00% 6 Missing ⚠️
pkg/gateway/lb/usecase/vald.go 85.71% 3 Missing and 1 partial ⚠️
pkg/gateway/lb/handler/grpc/aggregation.go 0.00% 1 Missing ⚠️
...kg/index/job/readreplica/rotate/service/rotator.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2276      +/-   ##
==========================================
+ Coverage   30.11%   30.13%   +0.02%     
==========================================
  Files         389      389              
  Lines       40757    40826      +69     
==========================================
+ Hits        12272    12303      +31     
- Misses      27833    27871      +38     
  Partials      652      652              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ykadowak pushed a commit that referenced this pull request Dec 20, 2023
This commit fixes the style issues introduced in 0e3b1ea according to the output
from Gofumpt and Prettier.

Details: #2276
@ykadowak ykadowak force-pushed the feature/readreplica/client branch 2 times, most recently from bf3d7a6 to 43aaad1 Compare January 19, 2024 01:55
@github-actions github-actions bot added size/L and removed size/L labels Jan 19, 2024
@github-actions github-actions bot added size/L and removed size/L labels Jan 19, 2024
@ykadowak ykadowak requested review from a team, vankichi and hlts2 and removed request for a team January 19, 2024 02:04
@github-actions github-actions bot removed the size/L label Jan 19, 2024
Copy link
Contributor

@hlts2 hlts2 left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants