Ronnie Sahlberg <sahlb...@google.com> 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to