Skip to content

Commit 73546ea

Browse files
committed
cr fix
1 parent f2acea3 commit 73546ea

File tree

1 file changed

+34
-25
lines changed

1 file changed

+34
-25
lines changed

protos/account.proto

+34-25
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ message UnblockAccountRequest {
4444
message UnblockAccountResponse {
4545
}
4646

47-
message UserInAccount {
48-
string user_id = 1;
49-
string user_name = 2;
50-
bool blocked = 3;
51-
}
52-
5347
message ClusterAccountInfo {
48+
message UserInAccount {
49+
string user_id = 1;
50+
string user_name = 2;
51+
bool blocked = 3;
52+
}
5453
string account_name = 1;
5554
repeated UserInAccount users = 2;
5655
optional string owner = 3;
@@ -138,6 +137,11 @@ message QueryAccountBlockStatusWithPartitionsResponse {
138137
}
139138

140139
message ClusterAccountInfoWithBlockedDetails {
140+
message UserInAccount {
141+
string user_id = 1;
142+
string user_name = 2;
143+
bool blocked = 3;
144+
}
141145
string account_name = 1;
142146
repeated UserInAccount users = 2;
143147
optional string owner = 3;
@@ -158,10 +162,15 @@ message GetAllAccountsWithUsersAndBlockedDetailsResponse {
158162
}
159163
// ********** Above is the interfaces for optional feature: RESOURCE_MANAGEMENT ***************
160164

165+
161166
message SyncAccountInfo {
167+
message UserInAccount {
168+
string user_id = 1;
169+
bool blocked = 2;
170+
}
162171
string account_name = 1;
163172
repeated UserInAccount users = 2;
164-
optional string owner = 3;
173+
optional string owner_id = 3;
165174
bool blocked_in_cluster = 4;
166175
// if blocked_in_cluster is true, the value is []
167176
// if blocked_in_cluster is false, only unblock in specified paritions
@@ -170,31 +179,31 @@ message SyncAccountInfo {
170179

171180
message SyncAccountUserInfoRequest {
172181
// session id during one same data sync operation
182+
// the scheduler can only process the same data once with the same session_id.
173183
uint64 session_id = 1;
174184
repeated SyncAccountInfo sync_accounts = 2;
175185
}
176186

177-
enum FailedOperation {
178-
CREATE_ACCOUNT = 0;
179-
BLOCK_ACCOUNT = 1;
180-
UNBLOCK_ACCOUNT = 2;
181-
ADD_USER_TO_ACCOUNT = 3;
182-
BLOCK_USER_IN_ACCOUNT = 4;
183-
REMOVE_USER_FROM_ACCOUNT = 5;
184-
}
185-
186-
message FailedInfo {
187-
bool executed = 1;
188-
FailedOperation failed_operation = 2;
189-
string account_name = 3;
190-
// value only exsits in users' operation of ADD_USER_TO_ACCOUNT, BLOCK_USER_IN_ACCOUNT or REMOVE_USER_FROM_ACCOUNT
191-
optional string user_id = 4;
192-
string failed_info_str = 5;
187+
enum SyncOperation {
188+
UNKNOWN = 0,
189+
CREATE_ACCOUNT = 1;
190+
BLOCK_ACCOUNT = 2;
191+
UNBLOCK_ACCOUNT = 3;
192+
ADD_USER_TO_ACCOUNT = 4;
193+
BLOCK_USER_IN_ACCOUNT = 5;
194+
REMOVE_USER_FROM_ACCOUNT = 6;
193195
}
194196

195197
message SyncAccountUserInfoResponse {
196-
// only returns when failed info exists
197-
repeated FailedInfo failed_infos = 1;
198+
message FailureInfo {
199+
SyncOperation sync_operation = 1;
200+
string failed_account_name = 2;
201+
// only exsits in users' failed operation of ADD_USER_TO_ACCOUNT, BLOCK_USER_IN_ACCOUNT or REMOVE_USER_FROM_ACCOUNT
202+
optional string failed_user_id = 3;
203+
string failed_info_message = 4;
204+
}
205+
// only returns when failure info exists
206+
repeated FailureInfo failure_info = 1;
198207
}
199208

200209
service AccountService {

0 commit comments

Comments
 (0)