From: Junio C Hamano <gitster@pobox.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: "John 'Warthog9' Hawley" <warthog9@eaglescrag.net>, git@vger.kernel.org
Subject: Re: [PATCH 0/3] Gitweb caching v7
Date: Sat, 30 Oct 2010 21:24:21 -0700 [thread overview]
Message-ID: <7v1v773s7e.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <m3k4l0girs.fsf@localhost.localdomain> (Jakub Narebski's message of "Sat\, 30 Oct 2010 01\:58\:29 -0700 \(PDT\)")
Jakub Narebski <jnareb@gmail.com> writes:
>> I am getting this in the gitweb.log:
>>
>> [Fri Oct 29 22:21:12 2010] gitweb.perl: Undefined subroutine
>> &main::cache_fetch called at .../t/../gitweb/gitweb.perl line 1124.
>>
>> which seems to cause t9500 to fail.
>
> This is caused by three issues (bugs) in v7 caching code.
>
> First is the reason why t9500 exhibits this bug. The gitweb caching
> v7 includes file with subroutines related to caching in the following
> way:
>
> do 'cache.pm';
>
> Note that the relative path is used; for t9500 it is relative from
> somewhere witjin 't/', and not from 'gitweb/', so "do 'cache.pm';"
> doesn't find it.
John, where should cache.pm go in the installed system? Does it typically
go next to gitweb.perl?
I think "do 'that-file'" honors path specified by the -I option, so I do
not think "do $cache_pm" is necessary. My preference is to run gitweb
tests with appropriate -I pointing at the cache.pm in the directory.
> ... It should be
>
> do $cache_pm;
> die $@ if $@;
>
> at least.
Catching failure is a good thing to do.
> Perhaps even better would be to simply turn off caching
> support if there is an error in 'cache.pm'
That can come later.
Jakub, can we have an absolute minimum fix-up, so that we can give
this wider exposure? I think there are only
four issues:
(1) exclude Ajax-y stuff from caching;
(2) install cache.pm the same way gitweb.perl is installed via
the Makefile;
(3) running tests with appropriate -I so that cache.pm is found; and
(4) die if 'cache.pm' cannot be "done").
I think the change in gitweb-cache v7 is small and safe enough that we
should fast-track it to give usability to the real world sites. It may be
a low-risk "obviously correct" approach that is quick-and-dirty, but that
is exactly why this should be fast-tracked. It does not touch the logic
or formatting in any way, just bypasses the page generation altogether
when it can clearly do so when it can tell the output cannot possibly be
incorrect (albeit sometimes it might be stale if in certain cases, e.g. it
is relative to HEAD).
I know you and others were aiming to split things up, but I think the
amount of the effort that is needed for that line of work on top of the
current codebase is not much different from what is needed on top of
gitweb-cache v7.
next prev parent reply other threads:[~2010-10-31 4:24 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-28 0:42 [PATCH 0/3] Gitweb caching v7 John 'Warthog9' Hawley
2010-10-28 0:42 ` [PATCH 1/3] gitweb: Add option to force version match John 'Warthog9' Hawley
2010-10-28 9:52 ` Jakub Narebski
2010-10-28 22:08 ` Junio C Hamano
2010-10-28 0:42 ` [PATCH 2/3] gitweb: add output buffering and associated functions John 'Warthog9' Hawley
2010-10-28 9:56 ` Jakub Narebski
2010-10-28 0:42 ` [PATCH 3/3] gitweb: File based caching layer (from git.kernel.org) John 'Warthog9' Hawley
2010-10-28 16:10 ` Jakub Narebski
2010-10-28 22:29 ` [PATCH 0/3] Gitweb caching v7 Junio C Hamano
2010-10-29 22:25 ` Junio C Hamano
2010-10-30 8:58 ` Jakub Narebski
2010-10-31 4:24 ` Junio C Hamano [this message]
2010-10-31 9:21 ` Jakub Narebski
2010-11-01 10:24 ` [PATCHv7.1 0/4] Gitweb caching v7.1 Jakub Narebski
2010-11-12 23:35 ` [RFC/PATCHv7.2 0/4] Gitweb caching v7.2 Jakub Narebski
2010-11-12 23:41 ` [PATCHv7.2 1/4] gitweb: Prepare for splitting gitweb Jakub Narebski
2010-11-17 23:10 ` Junio C Hamano
2010-11-18 13:37 ` Jakub Narebski
2010-12-02 10:17 ` [PATCHv7.3 1/4 (bugfix)] " Jakub Narebski
2010-12-02 17:37 ` Junio C Hamano
2010-12-02 19:01 ` Jakub Narebski
2010-12-02 19:21 ` Junio C Hamano
2010-12-02 19:36 ` Jakub Narebski
2010-11-12 23:44 ` [PATCHv7.1 2/4] gitweb: add output buffering and associated functions Jakub Narebski
2010-11-12 23:56 ` [PATCHv7.1 3/4] gitweb: File based caching layer (from git.kernel.org) Jakub Narebski
2010-11-28 11:22 ` [PATCHv7.1 3/4 (amend)] " Jakub Narebski
2010-11-28 11:31 ` Jakub Narebski
2010-11-29 22:13 ` Junio C Hamano
2010-11-29 22:20 ` Junio C Hamano
2010-11-29 23:09 ` [PATCHv7.1 3/4 (amend v2)] " Jakub Narebski
2010-11-30 0:51 ` Junio C Hamano
2010-11-30 10:21 ` Jakub Narebski
2010-11-29 23:07 ` [PATCHv7.1 3/4] " demerphq
2010-11-29 23:26 ` demerphq
2010-11-29 23:54 ` Jakub Narebski
2010-11-13 0:01 ` [PATCHv7.2 4/4] gitweb: Minimal testing of gitweb caching Jakub Narebski
2010-11-17 22:37 ` Junio C Hamano
2010-11-17 23:12 ` Jakub Narebski
2010-11-01 10:24 ` [PATCHv7.1 1/4] gitweb: Prepare for splitting gitweb Jakub Narebski
2010-11-01 18:50 ` [PATCHv7.1b " Jakub Narebski
2010-11-01 10:24 ` [PATCHv7.1 2/4] gitweb: add output buffering and associated functions Jakub Narebski
2010-11-01 10:24 ` [PATCHv7.1 3/4] gitweb: File based caching layer (from git.kernel.org) Jakub Narebski
2010-11-01 10:24 ` [PATCHv7.1 4/4] gitweb: Minimal testing of gitweb caching Jakub Narebski
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=7v1v773s7e.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=warthog9@eaglescrag.net \
/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).