Changeset: a50623b289c3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a50623b289c3
Modified Files:
        monetdb5/modules/mal/tablet.c
Branch: resultset
Log Message:

Reshuffle control and early bailout.
Next attempt to get a handle on the crashes.


diffs (49 lines):

diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c
--- a/monetdb5/modules/mal/tablet.c
+++ b/monetdb5/modules/mal/tablet.c
@@ -1373,6 +1373,10 @@ reportlackofinput:
                                mnstr_printf(GDKout,"#wait for consumers to 
finish buffer %d\n", (cur+1) % MAXBUFFERS);
 #endif
                                MT_sema_down(&task->producer, "SQLproducer");
+                               if ( task->state == ENDOFCOPY || task->ateof){
+                                       THRdel(thr);
+                                       return;
+                               }
                                blocked[(cur+1)% MAXBUFFERS ] = 0;
                                blocked [cur] = 1;
                                task->cur = cur;
@@ -1757,6 +1761,17 @@ SQLload_file(Client cntxt, Tablet *as, b
 
        task->ateof = 1;
        task->state = ENDOFCOPY;
+       if( !task->ateof || cnt <task->maxrow){
+#ifdef _DEBUG_TABLET_
+               mnstr_printf(GDKout,"#Shut down reader\n");
+#endif
+               MT_sema_up(&task->producer, "SQLload_file");
+               MT_join_thread(task->tid);
+       }
+
+       MT_sema_destroy(&ptask[j].producer);
+       MT_sema_destroy(&ptask[j].consumer);
+
 #ifdef _DEBUG_TABLET_
        for(i=0; i < as->nr_attrs; i++){
                mnstr_printf(GDKout,"column "BUNFMT"\n",i);
@@ -1796,16 +1811,6 @@ SQLload_file(Client cntxt, Tablet *as, b
                MT_sema_destroy(&ptask[j].sema);
                MT_sema_destroy(&ptask[j].reply);
        }
-       if( !task->ateof || cnt <task->maxrow){
-#ifdef _DEBUG_TABLET_
-               mnstr_printf(GDKout,"#Shut down reader\n");
-#endif
-               MT_sema_up(&task->producer, "SQLload_file");
-               MT_join_thread(task->tid);
-       }
-
-       MT_sema_destroy(&ptask[j].producer);
-       MT_sema_destroy(&ptask[j].consumer);
 
 #ifdef _DEBUG_TABLET_
        mnstr_printf(GDKout, "#Found " BUNFMT " tuples\n", cnt);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to