xapi-project/ocaml-xenstore — pull request #1 by jeromemaloberti (2013-09-12 10:57:11+00:00)
Title: Fix a bug with quota in transactions.

CA-100569: Perform a 3-way merge a the quota after a transaction.

At the beginning of a transaction, the quotas from the global store are duplicated
and modified by the transaction. If during the transaction, an action associated
to no transaction were concurrently executed, the quotas of the global store
were updated, but the change from the transaction would be unaccounted in the
quota.
This commit fix this problem by keeping another copy of the quota at the
beginning of the transaction, and performing a 3-way merge between the quotas
from the transaction and the "original" copy of the quota onto the quotas
of the global store.