@@ -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,6 +137,11 @@ 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
147
optional string owner = 3 ;
@@ -158,10 +162,15 @@ 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
+ bool blocked = 2 ;
170
+ }
162
171
string account_name = 1 ;
163
172
repeated UserInAccount users = 2 ;
164
- optional string owner = 3 ;
173
+ optional string owner_id = 3 ;
165
174
bool blocked_in_cluster = 4 ;
166
175
// if blocked_in_cluster is true, the value is []
167
176
// if blocked_in_cluster is false, only unblock in specified paritions
@@ -170,31 +179,31 @@ message SyncAccountInfo {
170
179
171
180
message SyncAccountUserInfoRequest {
172
181
// session id during one same data sync operation
182
+ // the scheduler can only process the same data once with the same session_id.
173
183
uint64 session_id = 1 ;
174
184
repeated SyncAccountInfo sync_accounts = 2 ;
175
185
}
176
186
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 ;
193
195
}
194
196
195
197
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 ;
198
207
}
199
208
200
209
service AccountService {
0 commit comments