Re: [PATCH 03/31] refs.c: rename the transaction functions

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

 



Ronnie Sahlberg <sahlberg@xxxxxxxxxx> writes:

> I am not sure if we need transactions for other types of data, such as
> sha1 objects, but if it turns out we do in the future we can rename
> these functions again.

I was wrong (and I think you read it in the later patch review).

If we need transaction for other types of data, and we will
eventually need to coordinate the transaction semantics over refs
and those other types of data.  It would be far cleaner to express
that coordination within the same transaction framework.

In other words, we do not want to be in a situation like this:

    other_transaction_begin();
    ref_transaction_begin();
    ref_transaction_update();
    other_transaction_update();
    ref_transaction_commit();
    if (other_transaction_commit() != SUCCESS) {
        ... oops it is too late to roll back the ref_transaction ...
        other_transaction_rollback();	
    }

and force us doing 3-phase commit inside ourselves to work it
around.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]