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: use breaker with ctx to prevent deadline exceeded #4091

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

kevwan
Copy link
Contributor

@kevwan kevwan commented Apr 18, 2024

  1. before calling req(), breaker will check whether the deadline is exceeded
  2. if deadline already exceeded, this request will be returned, and not counting

@kevwan kevwan force-pushed the feat/breaker-with-ctx branch 3 times, most recently from 8c629ea to a77eea6 Compare April 18, 2024 14:50
Signed-off-by: kevin <wanjunfeng@gmail.com>
Copy link

codecov bot commented Apr 18, 2024

Codecov Report

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

Project coverage is 95.18%. Comparing base (8690859) to head (1598b7c).
Report is 23 commits behind head on master.

Additional details and impacted files
Files Coverage Δ
core/stores/mon/collection.go 100.00% <100.00%> (ø)
core/stores/redis/breakerhook.go 100.00% <100.00%> (ø)
core/stores/sqlx/sqlconn.go 100.00% <100.00%> (ø)
core/stores/sqlx/stmt.go 100.00% <100.00%> (ø)
rest/httpc/service.go 100.00% <100.00%> (ø)
.../internal/clientinterceptors/breakerinterceptor.go 100.00% <100.00%> (ø)
.../internal/serverinterceptors/breakerinterceptor.go 100.00% <100.00%> (ø)
core/stores/mon/model.go 96.72% <87.50%> (+1.03%) ⬆️

... and 248 files with indirect coverage changes

@kevwan kevwan merged commit d371ab5 into zeromicro:master Apr 18, 2024
6 checks passed
@kevwan kevwan deleted the feat/breaker-with-ctx branch April 18, 2024 15:18
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

1 participant