@@ -44,13 +44,12 @@ message UnblockAccountRequest {
44
44
message UnblockAccountResponse {
45
45
}
46
46
47
- message UserInAccount {
48
- string user_id = 1 ;
49
- string user_name = 2 ;
50
- bool blocked = 3 ;
51
- }
52
-
53
47
message ClusterAccountInfo {
48
+ message UserInAccount {
49
+ string user_id = 1 ;
50
+ string user_name = 2 ;
51
+ bool blocked = 3 ;
52
+ }
54
53
string account_name = 1 ;
55
54
repeated UserInAccount users = 2 ;
56
55
optional string owner = 3 ;
@@ -138,9 +137,14 @@ message QueryAccountBlockStatusWithPartitionsResponse {
138
137
}
139
138
140
139
message ClusterAccountInfoWithBlockedDetails {
140
+ message UserInAccount {
141
+ string user_id = 1 ;
142
+ string user_name = 2 ;
143
+ bool blocked = 3 ;
144
+ }
141
145
string account_name = 1 ;
142
146
repeated UserInAccount users = 2 ;
143
- optional string owner = 3 ;
147
+ optional string owner_id = 3 ;
144
148
// return the overall blocked_status in all partitions
145
149
// false: when the queried account has one or more available partitions
146
150
// true: when the queried account has no available partitions
@@ -158,7 +162,13 @@ message GetAllAccountsWithUsersAndBlockedDetailsResponse {
158
162
}
159
163
// ********** Above is the interfaces for optional feature: RESOURCE_MANAGEMENT ***************
160
164
165
+
161
166
message SyncAccountInfo {
167
+ message UserInAccount {
168
+ string user_id = 1 ;
169
+ string user_name = 2 ;
170
+ bool blocked = 3 ;
171
+ }
162
172
string account_name = 1 ;
163
173
repeated UserInAccount users = 2 ;
164
174
optional string owner = 3 ;
@@ -170,31 +180,31 @@ message SyncAccountInfo {
170
180
171
181
message SyncAccountUserInfoRequest {
172
182
// session id during one same data sync operation
183
+ // the scheduler can only process the same data once with the same session_id.
173
184
uint64 session_id = 1 ;
174
185
repeated SyncAccountInfo sync_accounts = 2 ;
175
186
}
176
187
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 ;
193
196
}
194
197
195
198
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 ;
198
208
}
199
209
200
210
service AccountService {
0 commit comments