Skip to content

Conversation

@Hastyshell
Copy link
Collaborator

@Hastyshell Hastyshell commented Oct 24, 2024

Proposed changes

Usage

  1. adjust limit
curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?${params}
Entry Description
param uint64 qps_limit
behavior set qps_limit global default value
example curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000
Entry Description
param uint64 qps_limit, string rpc_name
behavior set RPC specific qps_limit
example curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&rpc_name=get_cluster
Entry Description
param uint64 qps_limit, string rpc_name, string instance_id
behavior set instance qps_limit for specific RPC
example ccurl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&rpc_name=get_cluster&instance_id="doris-0"
Entry Description
param uint64 qps_limit, string instance_id
behavior set global qps_limit for specific instance
example curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&instance_id="doris-0"
  1. query limit
Entry Description
param none
behavior query qps limit for all RPC interface
example curl http://ms_ip:ms_port/MetaService/http/v1/list_rate_limit

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions


#pragma once

#include <brpc/server.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'brpc/server.h' file not found [clang-diagnostic-error]

#include <brpc/server.h>
         ^

@Hastyshell Hastyshell force-pushed the dynamic-ms-rate-limit branch from 928d926 to 453770f Compare October 25, 2024 09:39
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

// specific language governing permissions and limitations
// under the License.

#include "rate-limiter/rate_limiter.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'rate-limiter/rate_limiter.h' file not found [clang-diagnostic-error]

#include "rate-limiter/rate_limiter.h"
         ^

@Hastyshell Hastyshell force-pushed the dynamic-ms-rate-limit branch 2 times, most recently from cb4d256 to 063ca50 Compare October 25, 2024 12:08
@Hastyshell
Copy link
Collaborator Author

run buildall

@Hastyshell Hastyshell force-pushed the dynamic-ms-rate-limit branch from 063ca50 to ebe7ddf Compare October 25, 2024 16:26
@Hastyshell
Copy link
Collaborator Author

run buildall

@Hastyshell Hastyshell force-pushed the dynamic-ms-rate-limit branch from ebe7ddf to e3098ab Compare October 28, 2024 04:28
@Hastyshell
Copy link
Collaborator Author

run buildall

@Hastyshell Hastyshell marked this pull request as ready for review October 28, 2024 06:13
@Hastyshell Hastyshell marked this pull request as draft October 29, 2024 12:13
@Hastyshell
Copy link
Collaborator Author

run buildall

@Hastyshell Hastyshell force-pushed the dynamic-ms-rate-limit branch from c6532ab to e541fab Compare October 31, 2024 12:42
@Hastyshell
Copy link
Collaborator Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@Hastyshell Hastyshell force-pushed the dynamic-ms-rate-limit branch from e541fab to c997f0d Compare October 31, 2024 13:40
@Hastyshell
Copy link
Collaborator Author

run buildall

@Hastyshell Hastyshell marked this pull request as ready for review November 1, 2024 01:53
@gavinchou
Copy link
Contributor

Add some usage examples in description.

@Hastyshell Hastyshell force-pushed the dynamic-ms-rate-limit branch from c997f0d to 1b6cbea Compare November 5, 2024 13:16
@Hastyshell
Copy link
Collaborator Author

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

qps_limit_str, rpc_name, instance_id));
};

static auto parse_qps_limit =
Copy link
Contributor

Choose a reason for hiding this comment

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

it seems that abuse using lambdas

});
};

// for 8 element in true table of params, register processor cb
Copy link
Contributor

Choose a reason for hiding this comment

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

this part is confusing

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe I'll add some comments, just register different callback for different params pattern, and the "abuse" of lamda are just meant to adapt for this.

@Hastyshell Hastyshell requested a review from gavinchou November 12, 2024 12:36
@Hastyshell
Copy link
Collaborator Author

run buildall

@Hastyshell Hastyshell force-pushed the dynamic-ms-rate-limit branch from 84e350b to 70f9607 Compare November 13, 2024 06:19
@Hastyshell
Copy link
Collaborator Author

run buildall

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 13, 2024
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@Hastyshell
Copy link
Collaborator Author

run compile

@Hastyshell
Copy link
Collaborator Author

run cloud_p0

@Hastyshell
Copy link
Collaborator Author

run p0

@Hastyshell
Copy link
Collaborator Author

run external

@gavinchou gavinchou merged commit 4783fc0 into apache:master Nov 13, 2024
github-actions bot pushed a commit that referenced this pull request Nov 13, 2024
…on meta service (#42413)

## Proposed changes

Usage
1. adjust limit
```
curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?${params}
```
| Entry      | Description |
| ----------- | ----------- |
| param         | uint64 qps_limit  |
|behavior   | set qps_limit global default value |
|example|```curl
http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000```|

| Entry      | Description |
| ----------- | ----------- |
| param         | uint64 qps_limit, string rpc_name  |
|behavior   | set RPC specific qps_limit  |
|example|curl
http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&rpc_name=get_cluster|

| Entry      | Description |
| ----------- | ----------- |
| param | uint64 qps_limit, string rpc_name, string instance_id |
|behavior   | set instance qps_limit for specific RPC  |
|example|```ccurl
http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&rpc_name=get_cluster&instance_id="doris-0"```|

| Entry      | Description |
| ----------- | ----------- |
| param         | uint64 qps_limit, string instance_id  |
|behavior   | set global qps_limit for specific instance  |
|example|```curl
http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&instance_id="doris-0"```|

2. query limit

| Entry      | Description |
| ----------- | ----------- |
| param         | none  |
|behavior   | query qps limit for all RPC interface |
|example|```curl
http://ms_ip:ms_port/MetaService/http/v1/list_rate_limit```|
dataroaring pushed a commit that referenced this pull request Nov 14, 2024
…on meta service (#42413)

## Proposed changes

Usage
1. adjust limit
```
curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?${params}
```
| Entry      | Description |
| ----------- | ----------- |
| param         | uint64 qps_limit  |
|behavior   | set qps_limit global default value |
|example|```curl
http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000```|

| Entry      | Description |
| ----------- | ----------- |
| param         | uint64 qps_limit, string rpc_name  |
|behavior   | set RPC specific qps_limit  |
|example|curl
http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&rpc_name=get_cluster|

| Entry      | Description |
| ----------- | ----------- |
| param | uint64 qps_limit, string rpc_name, string instance_id |
|behavior   | set instance qps_limit for specific RPC  |
|example|```ccurl
http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&rpc_name=get_cluster&instance_id="doris-0"```|

| Entry      | Description |
| ----------- | ----------- |
| param         | uint64 qps_limit, string instance_id  |
|behavior   | set global qps_limit for specific instance  |
|example|```curl
http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&instance_id="doris-0"```|

2. query limit

| Entry      | Description |
| ----------- | ----------- |
| param         | none  |
|behavior   | query qps limit for all RPC interface |
|example|```curl
http://ms_ip:ms_port/MetaService/http/v1/list_rate_limit```|
gavinchou pushed a commit that referenced this pull request Nov 14, 2024
…c qps limit on meta service #42413 (#43884)

Cherry-picked from #42413

Co-authored-by: Siyang Tang <tangsiyang2001@foxmail.com>
dataroaring pushed a commit that referenced this pull request Nov 21, 2024
…ng (#44362)

UT failed with coredump in PR #42413 but was not detected by CI. Fix the
problem.
github-actions bot pushed a commit that referenced this pull request Nov 21, 2024
…ng (#44362)

UT failed with coredump in PR #42413 but was not detected by CI. Fix the
problem.
@gavinchou gavinchou mentioned this pull request Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/3.0.3-merged p0_c reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants