[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] xs transaction


  • To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • 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
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.