Skip to content

Commit cd3071e

Browse files
committed
fix
1 parent f2acea3 commit cd3071e

File tree

1 file changed

+35
-25
lines changed

1 file changed

+35
-25
lines changed

protos/account.proto

+35-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,9 +137,14 @@ 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;
143-
optional string owner = 3;
147+
optional string owner_id = 3;
144148
// return the overall blocked_status in all partitions
145149
// false: when the queried account has one or more available partitions
146150
// true: when the queried account has no available partitions
@@ -158,7 +162,13 @@ 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+
string user_name = 2;
170+
bool blocked = 3;
171+
}
162172
string account_name = 1;
163173
repeated UserInAccount users = 2;
164174
optional string owner = 3;
@@ -170,31 +180,31 @@ message SyncAccountInfo {
170180

171181
message SyncAccountUserInfoRequest {
172182
// session id during one same data sync operation
183+
// the scheduler can only process the same data once with the same session_id.
173184
uint64 session_id = 1;
174185
repeated SyncAccountInfo sync_accounts = 2;
175186
}
176187

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;
188+
enum SyncOperation {
189+
UNKNOWN = 0,
190+
CREATE_ACCOUNT = 1;
191+
BLOCK_ACCOUNT = 2;
192+
UNBLOCK_ACCOUNT = 3;
193+
ADD_USER_TO_ACCOUNT = 4;
194+
BLOCK_USER_IN_ACCOUNT = 5;
195+
REMOVE_USER_FROM_ACCOUNT = 6;
193196
}
194197

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

200210
service AccountService {

0 commit comments

Comments
 (0)