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:34:40 +0800
Delivery-date: Tue, 11 Sep 2007 00:35:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C30C02FA.D656%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: <D470B4E54465E3469E2ABBC5AFAC390F013B223A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C30C02FA.D656%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acf0Q9+kPHP1cHSpSZSDVBFVO42XRAAAfPCSAAAbwlA=
Thread-topic: [Xen-devel] xs transaction
>From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx]
>Sent: 2007年9月11日 15:32
>
>We do support concurrent transactions at the API level, but the
>implementation will currently allow only one concurrent transaction that
>modifies state to succeed. This is a detail of the implementation however
>(from a semantic point of view -- it may impact performance of course!).
>
>Nested transactions (transactions within transactions) are not supported,
>and attempts to create a nested transaction will be explicitly failed.
>
> -- Keir
>

Sorry that I may miss some important logic here. However from what I 
read, do_transaction_start doesn't prevent nest case:

void do_transaction_start(struct connection *conn, struct buffered_data
*in)
{
        ...
        /* We don't support nested transactions. */
        if (conn->transaction) {
                send_error(conn, EBUSY);
                return;
        }

Conn->transaction is only set in life cycle of each message process:
static void process_message(struct connection *conn, struct buffered_data *in)
{
        trans = transaction_lookup(conn, in->hdr.msg.tx_id);
        ...
        conn->transaction = trans;
        switch (in->hdr.msg.type) {
        ...
        conn->transaction = NULL;
}

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); 

Thanks,
Kevin

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

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