Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:01:15

Ronnie Sahlberg [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help