diff options
author | Eric Wong <e@80x24.org> | 2020-09-19 09:37:11 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-09-19 21:39:45 +0000 |
commit | dc03cabb5d167618797e9e8a6ec615bda7b0638b (patch) | |
tree | 92b55c227d80cca785ac0c2edb0acb0c5c956549 /lib/PublicInbox/Git.pm | |
parent | 7c0c47e26af17918031d449d24abe40ad452f51a (diff) | |
download | public-inbox-dc03cabb5d167618797e9e8a6ec615bda7b0638b.tar.gz |
Since we only get OIDs from trusted local data sources (over.sqlite3), we can safely retry within the -gcf2 process without worry about clients spamming us with requests for invalid OIDs and triggering reopens.
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r-- | lib/PublicInbox/Git.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index a7ba57f9..b49b5bd3 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -192,7 +192,8 @@ sub cat_async_step ($$) { chop($$bref) eq "\n" or fail($self, 'LF missing after blob'); } elsif ($head =~ / missing$/) { # ref($req) indicates it's already been retried - if (!ref($req) && !$in_cleanup && alternates_changed($self)) { + # -gcf2 retries internally, so it never hits this path: + if (!ref($req) && !$in_cleanup && $self->alternates_changed) { return cat_async_retry($self, $inflight, $req, $cb, $arg); } @@ -394,7 +395,7 @@ sub pub_urls { sub cat_async_begin { my ($self) = @_; - cleanup($self) if alternates_changed($self); + cleanup($self) if $self->alternates_changed; batch_prepare($self); die 'BUG: already in async' if $self->{inflight}; $self->{inflight} = []; |