[Monetdb-developers] [Monetdb-checkins] MonetDB5/src/modules/mal remote.mx, , 1.87, 1.88

Martin Kersten Martin.Kersten at cwi.nl
Sun Apr 19 21:33:02 CEST 2009


Fabian Groffen wrote:
> On 19-04-2009 18:56:59 +0000, Martin Kersten wrote:
>> Log Message:
>> The client context record is shared between threads. This means that you
>> have to protect the structure when connection lists are initialized/used.
> 
> "The client context record is shared between threads"
> 
>> U remote.mx
>> Index: remote.mx
>> ===================================================================
>> RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/remote.mx,v
>> retrieving revision 1.87
>> retrieving revision 1.88
>> diff -u -d -r1.87 -r1.88
>> --- remote.mx	18 Apr 2009 08:45:34 -0000	1.87
>> +++ remote.mx	19 Apr 2009 18:56:57 -0000	1.88
>> @@ -512,7 +512,6 @@
>>  #endif
>>  
>>  	/* part 1: "user" -- this is trivial */
>> -	mal_set_lock(mal_remoteLock, "remote.list");
>     ^^^
>>  	c = userconns;
>>  	/* walk through the list */
>>  	while (c != NULL) {
>> @@ -524,7 +523,6 @@
>>  			break;
>>  		}
>>  	}
>> -	mal_unset_lock(mal_remoteLock, "remote.list");

>     ^^^
> 
> Was this intended?  A loop through a shared linked list is made here,
> which potentially can be modified while you walk through it, hence the
> lock that was here.
the locks are now placed one level higher in the calling structure.
It was a consequence of first protecting RMTconnect structures.

> 




More information about the developers-list mailing list