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

RE: [Xen-devel] xs transaction


  • To: "Vincent Hanquez" <vincent@xxxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Tue, 11 Sep 2007 20:30:14 +0800
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 11 Sep 2007 05:30:51 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acf0aUFiT4qOzfIQSQCZOYLXmeBbPQABbRcg
  • Thread-topic: [Xen-devel] xs transaction

>From: Vincent Hanquez [mailto:vincent@xxxxxxxxxxxxx]
>Sent: 2007年9月11日 19:45
>
>xenstored is single threaded and the libxs accesses are serialed through
>a mutex which prevent two threads to access the ring at the same time.
>if it was not, you'ld have much more problems than having two
>transactions at the same time.
>
>xenstored will always complete a process_message function until it try
>to read a new packet. at this point the conn->transaction is back to
>NULL.

Thanks, and I see the point now.

>
>> 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.
>
>how are you sure it doesn't handle parallel transactions ?

My fault actually and it does handle. If multiple transactions are in 
parallel, 1st end will update its changes into global tdb with the rest 
failed (EAGAIN) to caller for retry. :-)

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®.