From: Jonathan Nieder <email@example.com>
To: Matthew DeVore <firstname.lastname@example.org>
Cc: Jonathan Tan <email@example.com>,
Subject: Re: Proposal: object negotiation for partial clones
Date: Mon, 6 May 2019 17:02:05 -0700 [thread overview]
Message-ID: <20190507000205.GC57368@google.com> (raw)
Matthew DeVore wrote:
> On 2019/05/06, at 12:46, Jonathan Nieder <firstname.lastname@example.org> wrote:
>> Ah, interesting. When this was discussed before, the proposal has been
>> that the client can say "have" anyway. They don't have the commit and
>> all referenced objects, but they have the commit and a *promise* that
>> they can obtain all referenced objects, which is almost as good.
>> That's what "git fetch" currently implements.
> Doesn’t that mean the “have” may indicate that the client has the
> entire repository already, even though it’s only a partial clone? If
> so, then the client intends to ask for some tree plus trees and
> blobs 2-3 levels down deeper, how would the server distinguish
> between those objects the client *really* has and those that were
> just promised to them? Because the whole purpose of this
> hypothetical request is to get a bunch of promises fulfilled of
> which 0-99% are fulfilled already.
For blobs, the answer is simple: the server returns any object
explicitly named in a "want", even if the client already should have
For trees, the current behavior is the same: if you declare that you
"have" everything, then if you "want" a tree with filter tree:2, you
only get that tree. So here there's already room for improvement.
> Maybe something like this (conceptually based on original proposal) ?
> 1. Client sends request for an object or objects with an extra flag
> which means “I can’t really tell you what I already have since it’s
> a chaotic subset of the object database of the repo”
> 2. Server responds back with set of objects, represented by deltas
> if that is how the server has them on disk, along with a list of
> object-IDs needed in order to resolve the content of all the
> objects. These object-IDs can go several layers of deltas back, and
> they go back as far as it takes to get to an object stored in its
> entirety by the server.
> 3. Client responds back with another request (this time the extra
> flag sent from step 1 is not necessary) which has “want”s for every
> object the server named which the client already has.
> Very hand-wavey, but I think you see my idea.
The only downside I see is that the list of objects may itself be
large, and the server has to check reachability for each one. But
maybe that's fine.
Perhaps after that initial response, instead of sending the list of
individual objects the client wants, it could send a list of relevant
objects it has (combined with the original set of "want"s). That
could be a smaller request and it means less work for the server to
check each "want" for reachability.
What do you think?
> That's a very good point. The data the first request gives us is
> basically the tree objects minus file names and modes. So I think a
> better feature to implement would be combining of multiple filters.
> That way, the client can combine "tree:<some small number>" and
> "blob:none" and basically get an "enumeration" of available objects.
This might be simpler.
Combining filters would be useful for other uses, too.
next prev parent reply other threads:[~2019-05-07 0:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-28 15:55 Proposal: object negotiation for partial clones Matthew DeVore
2019-05-06 18:25 ` Jonathan Nieder
2019-05-06 19:28 ` Jonathan Tan
2019-05-06 19:46 ` Jonathan Nieder
2019-05-06 23:20 ` Matthew DeVore
2019-05-07 0:02 ` Jonathan Nieder [this message]
2019-05-06 22:47 ` Matthew DeVore
2019-05-07 18:34 ` Jonathan Tan
2019-05-07 21:57 ` Matthew DeVore
2019-05-09 18:00 ` Jonathan Tan
2019-05-14 0:09 ` Matthew DeVore
2019-05-14 0:16 ` Jonathan Nieder
2019-05-16 18:56 ` [RFC PATCH 0/3] implement composite filters Matthew DeVore
2019-05-16 18:56 ` [RFC PATCH 1/3] list-objects-filter: refactor into a context struct Matthew DeVore
2019-05-16 18:56 ` [RFC PATCH 2/3] list-objects-filter-options: error is localizeable Matthew DeVore
2019-05-16 18:56 ` [RFC PATCH 3/3] list-objects-filter: implement composite filters Matthew DeVore
2019-05-17 3:25 ` Junio C Hamano
2019-05-17 13:17 ` Matthew DeVore
2019-05-19 1:12 ` Junio C Hamano
2019-05-20 18:24 ` Matthew DeVore
2019-05-20 18:28 ` Matthew DeVore
2019-05-16 22:41 ` [RFC PATCH 0/3] " Jonathan Tan
2019-05-17 0:01 ` Matthew DeVore
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:
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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.
Code repositories for project(s) associated with this public inbox
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 read-only IMAP folder(s) and NNTP newsgroup(s).