git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/7] receive-pack.c: add protocol support to negotiate atomic-push

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 30, 2014, 16:47 UTC
Message-ID
<xmqqvbktrsom.fsf@gitster.dls.corp.google.com>
In-Reply-To
<549A6C4C.8000905@alum.mit.edu>
Michael Haggerty <mhagger@alum.mit.edu> writes:
Show 5 quoted lines
> If I understand correctly, after this patch the server advertises the
> "atomic" capability even though it doesn't actually have that ability
> until a later patch. It seems to me that the order of the patches should
> be reversed: don't advertise the capability before it is actually
> implemented. Why? Bisection. Between the two patches the server is buggy.
That is a valid point.  It also reminds us of another thing.

We would need a way to test interoperability among the three new combinations (i.e. new and old receive-pack talking to new and old "git push"). We can control what the sender talks on the wire by giving or not giving "--atomic" option on the command line, but there should be a way for us to control what the receiver talks on the wire, i.e. "receivepack.pushAtomic = false" that tells us not to advertise the "atomic push" capability over the wire, even if you are running the updated "receive-pack" binary.

This will not only for testing. When we discover that "atomic" support is undesirable for whatever reason (e.g. the transaction machinery may consume too many file descriptors without a good reason), we would need a way for users to disable it until the problem is fixed.

And of course the tests should make sure that
 (1) "git push --atomic" that talks with the receiving end that has
     receivepack.pushAtomic set to false behaves as we desire (error
     out? degrade to non-atomic? --- whichever way we decide).
 (2) "git push" that talks with the receiving end with "atomic" enabled
     does not do an atomic push, i.e. try to push two refs, one that
     fast forwards and the other that does not, and see one ref is
     updated while the other ref remains intact and "git push"
     itself reports failured.;
 (3) "git push --atomic" that talks with the receiving end with
     "atomic" enabled does the atomic thing.
among other things.
Previous: Michael HaggertyNext: Stefan Beller
Message 6 of 20 in “[PATCHv6 0/7] atomic pushes”
  1. Stefan BellerDec 19, 2014
  2. 1/7 receive-pack.c: add protocol support to negotiate atomic-pushStefan Beller, Dec 19, 2014
  3. Eric SunshineDec 22, 2014
  4. Stefan BellerDec 23, 2014
  5. Michael HaggertyDec 24, 2014
  6. Junio C HamanoDec 30, 2014
  7. 2/7 send-pack: Rename ref_update_to_be_sent to check_to_send_updateStefan Beller, Dec 19, 2014
  8. 3/7 send-pack.c: add --atomic command line argumentStefan Beller, Dec 19, 2014
  9. Eric SunshineDec 22, 2014
  10. 4/7 receive-pack.c: receive-pack.c: use a single ref_transaction for atomic pushesStefan Beller, Dec 19, 2014
  11. Eric SunshineDec 23, 2014
  12. 5/7 receive-pack: move execute_commands_non_atomic before execute_commandsStefan Beller, Dec 19, 2014
  13. Junio C HamanoDec 22, 2014
  14. Stefan BellerDec 24, 2014
  15. 6/7 push.c: add an --atomic argumentStefan Beller, Dec 19, 2014
  16. Michael HaggertyDec 26, 2014
  17. Stefan BellerDec 29, 2014
  18. Junio C HamanoDec 29, 2014
  19. 7/7 t5543-atomic-push.sh: add basic tests for atomic pushesStefan Beller, Dec 19, 2014
  20. Junio C HamanoDec 22, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.