From: Stefan Beller <stefanbeller@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>,
Stefan Beller <sbeller@google.com>
Cc: ronnie sahlberg <ronniesahlberg@gmail.com>,
Michael Haggerty <mhagger@alum.mit.edu>,
Jonathan Nieder <jrnieder@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Git List <git@vger.kernel.org>,
Ronnie Sahlberg <sahlberg@google.com>
Subject: Re: [PATCH 1/7] receive-pack.c: add protocol support to negotiate atomic-push
Date: Mon, 22 Dec 2014 18:09:50 -0800 [thread overview]
Message-ID: <5498CEEE.9010105@gmail.com> (raw)
In-Reply-To: <CAPig+cRStBZMNj_K-81n2aZ3SzvH8VSeXwwk0MM5Q01FANRdPg@mail.gmail.com>
On 22.12.2014 14:52, Eric Sunshine wrote:
> On Fri, Dec 19, 2014 at 2:38 PM, Stefan Beller <sbeller@google.com> wrote:
>> From: Ronnie Sahlberg <sahlberg@google.com>
>>
>> This adds support to the protocol between send-pack and receive-pack to
>> * allow receive-pack to inform the client that it has atomic push capability
>> * allow send-pack to request atomic push back.
>>
>> There is currently no setting in send-pack to actually request that atomic
>> pushes are to be used yet. This only adds protocol capability not ability
>> for the user to activate it.
>>
>> Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
>> Signed-off-by: Stefan Beller <sbeller@google.com>
>> ---
>> diff --git a/Documentation/technical/protocol-capabilities.txt b/Documentation/technical/protocol-capabilities.txt
>> index 6d5424c..4f8a7bf 100644
>> --- a/Documentation/technical/protocol-capabilities.txt
>> +++ b/Documentation/technical/protocol-capabilities.txt
>> @@ -244,6 +245,14 @@ respond with the 'quiet' capability to suppress server-side progress
>> reporting if the local progress reporting is also being suppressed
>> (e.g., via `push -q`, or if stderr does not go to a tty).
>>
>> +atomic
>> +------
>> +
>> +If the server sends the 'atomic' capability it is capable of accepting
>> +atomic pushes. If the pushing client requests this capability, the server
>> +will update the refs in one atomic transaction. Either all refs are
>
> Not itself worth a re-send, but if you re-send for some other reason...
>
> "one atomic" still smacks of redundancy; "an atomic" sounds better.
I did hear you saying 'one single atomic' being too redundant. And I
agree that 'one' and 'single' makes the redundancy.
However I have the impression 'an atomic' is too weak. Not everybody is
a careful reader picking up the subtle notions. Not everybody is english
native. Or concentrated.
Look at it the other way: How could it be done?
* All of the refs could be updated one at a time, not atomically, so
foreach ref:
open refs/heads/bla:
write new sha1
* All of the refs could be updated at once, not atomically:
open refs pack file:
write new content
* All of the refs could be updated, one at a time, atomically:
foreach ref:
get lock
write content to lock
rename into place
* All of the refs at once, atomically.
open packed refs file lock:
write new content
rename into place
That said, atomicity and how many transactions there are, are orthogonal
to each other. That's why I'd keep pointing out 'one atomic'
transaction.
Thanks for all the comments. I may be doing cleanup patches for you on
top of what Junio queued.
>
>> +updated or none.
>> +
>> allow-tip-sha1-in-want
>> ----------------------
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2014-12-23 2:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-19 19:38 [PATCHv6 0/7] atomic pushes Stefan Beller
2014-12-19 19:38 ` [PATCH 1/7] receive-pack.c: add protocol support to negotiate atomic-push Stefan Beller
2014-12-22 22:52 ` Eric Sunshine
2014-12-23 2:09 ` Stefan Beller [this message]
2014-12-24 7:33 ` Michael Haggerty
2014-12-30 16:47 ` Junio C Hamano
2014-12-19 19:38 ` [PATCH 2/7] send-pack: Rename ref_update_to_be_sent to check_to_send_update Stefan Beller
2014-12-19 19:38 ` [PATCH 3/7] send-pack.c: add --atomic command line argument Stefan Beller
2014-12-22 22:58 ` Eric Sunshine
2014-12-19 19:38 ` [PATCH 4/7] receive-pack.c: receive-pack.c: use a single ref_transaction for atomic pushes Stefan Beller
2014-12-23 1:31 ` Eric Sunshine
2014-12-19 19:38 ` [PATCH 5/7] receive-pack: move execute_commands_non_atomic before execute_commands Stefan Beller
2014-12-22 18:19 ` Junio C Hamano
2014-12-24 0:30 ` Stefan Beller
2014-12-19 19:39 ` [PATCH 6/7] push.c: add an --atomic argument Stefan Beller
2014-12-26 7:17 ` Michael Haggerty
2014-12-29 18:14 ` Stefan Beller
2014-12-29 20:33 ` Junio C Hamano
2014-12-19 19:39 ` [PATCH 7/7] t5543-atomic-push.sh: add basic tests for atomic pushes Stefan Beller
2014-12-22 18:24 ` [PATCHv6 0/7] " Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5498CEEE.9010105@gmail.com \
--to=stefanbeller@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=mhagger@alum.mit.edu \
--cc=ronniesahlberg@gmail.com \
--cc=sahlberg@google.com \
--cc=sbeller@google.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).