Skip to content

Commit 72950a2

Browse files
committed
fix
1 parent ed9e954 commit 72950a2

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

protos/account.proto

+24-8
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,19 @@ message ListAccountsResponse {
2222
repeated string accounts = 1;
2323
}
2424

25+
message SpecifiedPartitions {
26+
// specify the partitions
27+
// use the value only when is_partition_specified is true
28+
repeated string partitions = 1;
29+
}
30+
2531
message CreateAccountRequest {
2632
string account_name = 1;
2733
string owner_user_id = 2;
2834
// specify the available partitions when creating an account
29-
// when the value dose not exist: use all partitions
30-
repeated string available_partitions = 3;
35+
// when the value is undefined, create account with all partitions
36+
// when the value is [], create account with no available partitions
37+
optional SpecifiedPartitions available_partitions = 3;
3138
}
3239

3340
message CreateAccountResponse {
@@ -36,8 +43,8 @@ message CreateAccountResponse {
3643
message BlockAccountRequest {
3744
string account_name = 1;
3845
// when the value exists: block specified partition(s) of the account
39-
// when the value dose not exist or is []: block the account in all partitions
40-
repeated string available_partitions = 3;
46+
// when the value is undefined: block the account in all partitions
47+
optional SpecifiedPartitions blocked_partitions = 2;
4148
}
4249

4350
message BlockAccountResponse {
@@ -46,13 +53,18 @@ message BlockAccountResponse {
4653
message UnblockAccountRequest {
4754
string account_name = 1;
4855
// specify the available partition(s) when executing unblock
49-
// when the value dose not exist: use all partitions
50-
repeated string available_partitions = 2;
56+
// when the value is undefined: use all partitions
57+
optional SpecifiedPartitions unblocked_partitions = 2;
5158
}
5259

5360
message UnblockAccountResponse {
5461
}
5562

63+
message AccountStatusInPartition {
64+
string partition = 1;
65+
bool blocked = 2;
66+
}
67+
5668
message ClusterAccountInfo {
5769
message UserInAccount {
5870
string user_id = 1;
@@ -63,6 +75,8 @@ message ClusterAccountInfo {
6375
repeated UserInAccount users = 2;
6476
optional string owner = 3;
6577
bool blocked = 4;
78+
// the details of account blocked status in every partition
79+
repeated AccountStatusInPartition accountBlockedDetails = 5;
6680
}
6781

6882
message GetAllAccountsWithUsersRequest {
@@ -76,12 +90,14 @@ message GetAllAccountsWithUsersResponse {
7690
message QueryAccountBlockStatusRequest {
7791
string account_name = 1;
7892
// query in specified partition(s)
79-
// when the value does not exist, maintain the original query logic
80-
repeated string partitions = 2;
93+
// when the value does not exist or [], use all partitions
94+
optional SpecifiedPartitions queryed_partitions = 2;
8195
}
8296

8397
message QueryAccountBlockStatusResponse {
8498
bool blocked = 1;
99+
// the details of account blocked status in every partition
100+
repeated AccountStatusInPartition accountBlockedDetails = 2;
85101
}
86102

87103

0 commit comments

Comments
 (0)