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

Core persistence priority rate limiting #3139

Merged
merged 13 commits into from
Jul 27, 2022

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Jul 25, 2022

What changed?

  • Priority rate limiting for core persistence apis

Why?

  • System stability

How did you test it?

  • Tested locally.
  • Adding unit test

Potential risks

Is hotfix candidate?

  • Yes

@yycptt yycptt requested a review from yiminc July 25, 2022 18:15
@yycptt yycptt marked this pull request as ready for review July 25, 2022 23:29
@yycptt yycptt requested a review from a team as a code owner July 25, 2022 23:29
common/persistence/client/quotas.go Show resolved Hide resolved
@@ -147,7 +153,7 @@ func (p *shardRateLimitedPersistenceClient) GetOrCreateShard(
ctx context.Context,
request *GetOrCreateShardRequest,
) (*GetOrCreateShardResponse, error) {
if ok := p.rateLimiter.Allow(); !ok {
if ok := allow(ctx, "GetOrCreateShard", p.rateLimiter); !ok {
Copy link
Member

Choose a reason for hiding this comment

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

another candidate for auto-gen client @dnr :)

common/rpc/interceptor/rate_limit.go Show resolved Hide resolved
service/matching/taskWriter.go Show resolved Hide resolved
common/cluster/metadata.go Show resolved Hide resolved
@yycptt yycptt merged commit 7f48014 into temporalio:master Jul 27, 2022
@yycptt yycptt deleted the persistence-priority-rl branch July 27, 2022 19:54
yycptt added a commit that referenced this pull request Jul 29, 2022
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

2 participants