File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -145,15 +145,26 @@ public int append(Table table) throws IOException {
145
145
int affected = 0 ;
146
146
for (int i =0 ; i <tasks .size (); ++i ){
147
147
DBTask task = tasks .get (i );
148
- if (task .isSuccessful ()){
148
+ while (!task .isFinished ()) {
149
+ try {
150
+ Thread .sleep (100 );
151
+ } catch (InterruptedException e ) {
152
+ throw new RuntimeException (e );
153
+ }
154
+ }
155
+
156
+ if (task .isSuccessful ()) {
149
157
Entity re = task .getResult ();
150
- if (re .getDataType () == Entity .DATA_TYPE .DT_VOID ){
158
+ if (re .getDataType () == Entity .DATA_TYPE .DT_VOID ) {
151
159
affected = 0 ;
152
- }else {
160
+ } else {
153
161
affected += ((BasicInt )task .getResult ()).getInt ();
154
162
}
163
+ } else {
164
+ throw new RuntimeException ("Task [" + i + "] come across execption: " + task .getErrorMsg ());
155
165
}
156
166
}
167
+
157
168
return affected ;
158
169
}
159
170
You can’t perform that action at this time.
0 commit comments