[Monetdb-developers] [Monetdb-checkins] MonetDB5/src/modules/mal bpm.mx, , 1.137, 1.138 mal_mapi.mx, , 1.16, 1.17

Martin Kersten Martin.Kersten at cwi.nl
Thu Sep 11 12:18:57 CEST 2008


Stefan Manegold wrote:
> On Wed, Sep 10, 2008 at 07:06:16PM +0000, Martin Kersten wrote:
>> Update of /cvsroot/monetdb/MonetDB5/src/modules/mal
>> In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20655
>>
>> Modified Files:
>> 	bpm.mx mal_mapi.mx 
>> Log Message:
>> bpm- defense against failed BATextend
> 
> As mentioned before, proper error handling would be the better solution than
> an assert in such cases --- recall and be aware the assertions are disabled
> in released versions; hence, case of a failing BATextend the released
> version will react with a segfault!
> 
BATextend should not come back in this case.
It is a protection against non-disclosed bugs appearing in loading
a table of 350GB and 6B records.
> Stefan
> 
>>
>> U bpm.mx
>> Index: bpm.mx
>> ===================================================================
>> RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/bpm.mx,v
>> retrieving revision 1.137
>> retrieving revision 1.138
>> diff -u -d -r1.137 -r1.138
>> --- bpm.mx	25 Aug 2008 16:12:42 -0000	1.137
>> +++ bpm.mx	10 Sep 2008 19:06:14 -0000	1.138
>> @@ -1535,7 +1535,8 @@
>>  		bn= BATdescriptor(px->bid);
>>  		if( bn== NULL)
>>  			throw(MAL,"bpm.addPartition","Partition BAT not found");
>> -		BATappend(bn,b,TRUE);
>> +		bn= BATappend(bn,b,TRUE);
>> +		assert(bn!=NULL);
>                 ^^^^^^^^^^^^^^^^^
>>  		px ->cnt += BATcount(b);
>>  		BBPunfix(bn->batCacheid); 
>>  #ifdef _DEBUG_BPM_
>> @@ -2266,7 +2267,8 @@
>>  		b= BATdescriptor(i);
>>  		if( b== NULL)
>>  			throw(MAL,"bpm.fold","Partitioned BAT not found");
>> -		BATappend(bn,b,FALSE);
>> +		bn= BATappend(bn,b,FALSE);
>> +		assert(bn!=NULL);
>                 ^^^^^^^^^^^^^^^^^
>>  		/* remove its persistency counter */
>>  		BBPdecref(b->batCacheid,TRUE);
>>  		BBPunfix(b->batCacheid);
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK & win great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Monetdb-checkins mailing list
>> Monetdb-checkins at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
>>
>>
> 





More information about the developers-list mailing list