git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Show URL in the "Getting <foo> list" http-fetch messages
@ 2005-11-12  0:49 Petr Baudis
  2005-11-12  0:58 ` Petr Baudis
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Baudis @ 2005-11-12  0:49 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Signed-off-by: Petr Baudis <pasky@suse.cz>
---

 http-fetch.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/http-fetch.c b/http-fetch.c
index e7655d1..e6e7df6 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -795,7 +795,7 @@ static int fetch_alternates(char *base)
 	buffer.buffer = data;
 
 	if (get_verbosely)
-		fprintf(stderr, "Getting alternates list\n");
+		fprintf(stderr, "Getting alternates list for %s\n", base);
 	
 	url = xmalloc(strlen(base) + 31);
 	sprintf(url, "%s/objects/info/http-alternates", base);
@@ -918,7 +918,7 @@ static int fetch_indices(struct alt_base
 	buffer.buffer = data;
 
 	if (get_verbosely)
-		fprintf(stderr, "Getting pack list\n");
+		fprintf(stderr, "Getting pack list for %s\n", repo->base);
 	
 	url = xmalloc(strlen(repo->base) + 21);
 	sprintf(url, "%s/objects/info/packs", repo->base);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Show URL in the "Getting <foo> list" http-fetch messages
  2005-11-12  0:49 [PATCH] Show URL in the "Getting <foo> list" http-fetch messages Petr Baudis
@ 2005-11-12  0:58 ` Petr Baudis
  2005-11-12  1:17   ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Baudis @ 2005-11-12  0:58 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Dear diary, on Sat, Nov 12, 2005 at 01:49:59AM CET, I got a letter
where Petr Baudis <pasky@suse.cz> said that...
> Signed-off-by: Petr Baudis <pasky@suse.cz>
> ---
> 
>  http-fetch.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/http-fetch.c b/http-fetch.c
> index e7655d1..e6e7df6 100644
> --- a/http-fetch.c
> +++ b/http-fetch.c
> @@ -795,7 +795,7 @@ static int fetch_alternates(char *base)
>  	buffer.buffer = data;
>  
>  	if (get_verbosely)
> -		fprintf(stderr, "Getting alternates list\n");
> +		fprintf(stderr, "Getting alternates list for %s\n", base);
>  	
>  	url = xmalloc(strlen(base) + 31);
>  	sprintf(url, "%s/objects/info/http-alternates", base);
> @@ -918,7 +918,7 @@ static int fetch_indices(struct alt_base
>  	buffer.buffer = data;
>  
>  	if (get_verbosely)
> -		fprintf(stderr, "Getting pack list\n");
> +		fprintf(stderr, "Getting pack list for %s\n", repo->base);
>  	
>  	url = xmalloc(strlen(repo->base) + 21);
>  	sprintf(url, "%s/objects/info/packs", repo->base);

By the way, this is only a pathetic remnant of my brave effort to get
rid of seeing the "Getting alternates list" message on the same
repository 20 times now since the parallel fetching got introduced.
I know how to do silence the messages, but doing the _fetching_ itself
seems as downright stupid thing in the first place.

Therefore, can I somehow stall fetching of an object? The idea is:

	I want to check the alternates list!
	I don't have it yet...
	...but a request for it is already queued. Ok, I'll wait.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Show URL in the "Getting <foo> list" http-fetch messages
  2005-11-12  0:58 ` Petr Baudis
@ 2005-11-12  1:17   ` Junio C Hamano
  2005-11-12 17:22     ` Nick Hengeveld
  0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2005-11-12  1:17 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git

Petr Baudis <pasky@suse.cz> writes:

> By the way, this is only a pathetic remnant of my brave effort to get
> rid of seeing the "Getting alternates list" message on the same
> repository 20 times now since the parallel fetching got introduced.
> I know how to do silence the messages, but doing the _fetching_ itself
> seems as downright stupid thing in the first place.
>
> Therefore, can I somehow stall fetching of an object? The idea is:
>
> 	I want to check the alternates list!
> 	I don't have it yet...
> 	...but a request for it is already queued. Ok, I'll wait.

I agree, and probably this applies when index request is in
transit as well.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Show URL in the "Getting <foo> list" http-fetch messages
  2005-11-12  1:17   ` Junio C Hamano
@ 2005-11-12 17:22     ` Nick Hengeveld
  2005-11-14 19:02       ` Nick Hengeveld
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Hengeveld @ 2005-11-12 17:22 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Petr Baudis, git

On Fri, Nov 11, 2005 at 05:17:42PM -0800, Junio C Hamano wrote:

> > Therefore, can I somehow stall fetching of an object? The idea is:
> >
> > 	I want to check the alternates list!
> > 	I don't have it yet...
> > 	...but a request for it is already queued. Ok, I'll wait.
> 
> I agree, and probably this applies when index request is in
> transit as well.

I just posted a patch to prevent another alternate request from starting
if one is already in progress.

This should not be an issue with index requests because they are only
initiated from fetch().  The previous patch to load alternates on demand
added alternate handling to process_curl_messages() so that a 404 for an
object can be handled immediately rather than waiting for the fetch()
call for that object to notice.

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Show URL in the "Getting <foo> list" http-fetch messages
  2005-11-12 17:22     ` Nick Hengeveld
@ 2005-11-14 19:02       ` Nick Hengeveld
  2005-11-14 20:11         ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Hengeveld @ 2005-11-14 19:02 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Petr Baudis, git

On Sat, Nov 12, 2005 at 09:22:02AM -0800, Nick Hengeveld wrote:

> This should not be an issue with index requests because they are only
> initiated from fetch().  The previous patch to load alternates on demand
> added alternate handling to process_curl_messages() so that a 404 for an
> object can be handled immediately rather than waiting for the fetch()
> call for that object to notice.

Seems like it might make sense to handle pack downloads immediately when
an object is unavailable rather than waiting for the fetch() call.  It
could prevent attempts to download any other objects inside that pack,
although queued requests that activate while a pack is downloading
would have to wait to see whether the download is successful.  If such
an object also exists loose it would prevent a redundant download and if
not it would at least prevent an unnecessary check and 404.

Thoughts?

-- 
For a successful technology, reality must take precedence over public
relations, for nature cannot be fooled.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Show URL in the "Getting <foo> list" http-fetch messages
  2005-11-14 19:02       ` Nick Hengeveld
@ 2005-11-14 20:11         ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2005-11-14 20:11 UTC (permalink / raw)
  To: Nick Hengeveld; +Cc: Petr Baudis, git

Nick Hengeveld <nickh@reactrix.com> writes:

> On Sat, Nov 12, 2005 at 09:22:02AM -0800, Nick Hengeveld wrote:
>
>> This should not be an issue with index requests because they are only
>> initiated from fetch().  The previous patch to load alternates on demand
>> added alternate handling to process_curl_messages() so that a 404 for an
>> object can be handled immediately rather than waiting for the fetch()
>> call for that object to notice.
>
> Seems like it might make sense to handle pack downloads immediately when
> an object is unavailable rather than waiting for the fetch() call.  It
> could prevent attempts to download any other objects inside that pack,
> although queued requests that activate while a pack is downloading
> would have to wait to see whether the download is successful.

I think that makes sense, and it probably is preferable to make
them wait than blindly go ahead.  Although we are issuing
requests in parallel, these simultaneous requests are asking for
related things (e.g. parent commit objects or the tree object of
the commit we just saw; blob objects contained in the tree we
just saw) and are more likely than not to be found in the pack
being requested.  Losing parallelism while a pack is in transit
would not be too much of a problem.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-11-14 20:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-12  0:49 [PATCH] Show URL in the "Getting <foo> list" http-fetch messages Petr Baudis
2005-11-12  0:58 ` Petr Baudis
2005-11-12  1:17   ` Junio C Hamano
2005-11-12 17:22     ` Nick Hengeveld
2005-11-14 19:02       ` Nick Hengeveld
2005-11-14 20:11         ` Junio C Hamano

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).