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 {
145145 int affected = 0 ;
146146 for (int i =0 ; i <tasks .size (); ++i ){
147147 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 ()) {
149157 Entity re = task .getResult ();
150- if (re .getDataType () == Entity .DATA_TYPE .DT_VOID ){
158+ if (re .getDataType () == Entity .DATA_TYPE .DT_VOID ) {
151159 affected = 0 ;
152- }else {
160+ } else {
153161 affected += ((BasicInt )task .getResult ()).getInt ();
154162 }
163+ } else {
164+ throw new RuntimeException ("Task [" + i + "] come across execption: " + task .getErrorMsg ());
155165 }
156166 }
167+
157168 return affected ;
158169 }
159170
You can’t perform that action at this time.
0 commit comments