WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] xs transaction

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] xs transaction
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Tue, 11 Sep 2007 15:44:24 +0800
Delivery-date: Tue, 11 Sep 2007 00:45:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C30C057A.D65D%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <D470B4E54465E3469E2ABBC5AFAC390F013B223B@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C30C057A.D65D%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acf0Q9+kPHP1cHSpSZSDVBFVO42XRAAAfPCSAAAbwlAAAEOchQAAJD+A
Thread-topic: [Xen-devel] xs transaction
>From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx]
>Sent: 2007年9月11日 15:43
>
>On 11/9/07 08:34, "Tian, Kevin" <kevin.tian@xxxxxxxxx> wrote:
>
>> So given following nest case, I'm not sure how it's prevented:
>> Xs_transaction_start(xs_handle);
>> <- at this point, conn->transaction is NULL
>> Xs_transaction_start(xs_handle);
>
>These transactions are not nested (at least from the p.o.v. of xenstored):
>they are independent transaction contexts which cannot see one
>another's
>updates. It's not even possible to request construction of a nested
>transaction via the interfaces exposed in xs.h.
>

OK, if you mean nest as two transactions with parent-child relationship... 
So the problem is still here, existing code doesn't prevent multiple 
transactions created under same connection, while message process 
logic can't not handle multiple.

Say two threads both start transactions under same connection ID. It's 
likely to succeed as long as two starts goes in sequence. However later 
once two threads have message sent to xenstore at same time, one 
will cause assertion and xenstore can't handle.

Since we're sure that current implementation doesn't handle parallel 
transactions (though API level allows), I think do_transaction_start 
should check conn->transaction_list instead of conn->transaction to 
ensure it.

Thanks,
Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>