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

bugfix success handling in the half-open and add flow control #1805

Merged
merged 8 commits into from
Oct 14, 2022

Conversation

hlts2
Copy link
Collaborator

@hlts2 hlts2 commented Oct 12, 2022

Description:

WHAT

As titled

WHY

The rate is not being used properly because the state is being changed immediately on success at half-open. Also, there is no function to limit the flow rate at half-open, so this should be added.

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.19.1
  • Docker Version: 20.10.8
  • Kubernetes Version: 1.22.0
  • NGT Version: 1.14.8

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - replace the PR body by changelog details
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase main
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@codecov
Copy link

codecov bot commented Oct 12, 2022

Codecov Report

Base: 50.23% // Head: 30.26% // Decreases project coverage by -19.97% ⚠️

Coverage data is based on head (2dc089f) compared to base (97eed29).
Patch coverage: 58.80% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1805       +/-   ##
===========================================
- Coverage   50.23%   30.26%   -19.98%     
===========================================
  Files         231      371      +140     
  Lines       13464    34011    +20547     
===========================================
+ Hits         6764    10294     +3530     
- Misses       6499    23302    +16803     
- Partials      201      415      +214     
Impacted Files Coverage Δ
cmd/tools/cli/loadtest/main.go 0.00% <ø> (ø)
hack/benchmark/assets/x1b/loader.go 0.00% <ø> (ø)
hack/benchmark/internal/assets/dataset.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/insert.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/operation.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/option.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/remove.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/search.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/util.go 0.00% <ø> (ø)
hack/license/gen/main.go 0.00% <0.00%> (ø)
... and 247 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 12, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2dc089f
Status: ✅  Deploy successful!
Preview URL: https://a4ef6cf4.vald.pages.dev
Branch Preview URL: https://bugfix-internal-circuitbreak.vald.pages.dev

View logs

internal/circuitbreaker/breaker.go Show resolved Hide resolved
internal/circuitbreaker/breaker.go Outdated Show resolved Hide resolved
@hlts2 hlts2 self-assigned this Oct 12, 2022
internal/circuitbreaker/breaker_test.go Show resolved Hide resolved
internal/circuitbreaker/breaker_test.go Show resolved Hide resolved
internal/circuitbreaker/breaker_test.go Show resolved Hide resolved
internal/circuitbreaker/breaker_test.go Show resolved Hide resolved
internal/circuitbreaker/breaker_test.go Show resolved Hide resolved
internal/circuitbreaker/breaker_test.go Show resolved Hide resolved
internal/circuitbreaker/breaker_test.go Show resolved Hide resolved
internal/circuitbreaker/breaker_test.go Show resolved Hide resolved
Signed-off-by: hlts2 <[email protected]>
@hlts2 hlts2 requested review from kpango and vankichi October 12, 2022 08:59
Signed-off-by: hlts2 <[email protected]>
Copy link
Collaborator

@kpango kpango left a comment

Choose a reason for hiding this comment

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

LGTM

@hlts2 hlts2 requested a review from kevindiu October 13, 2022 05:29
@kpango kpango merged commit 667b2f4 into main Oct 14, 2022
@kpango kpango deleted the bugfix/internal/circuitbreaker-rate branch October 14, 2022 09:14
@kpango kpango mentioned this pull request Oct 18, 2022
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