From ba2253e9a04f595f43889235264ed26b75c57347 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 27 Jan 2019 03:38:41 +0000 Subject: solver: crank up max patches to 9999 Might as well, since the only constraint is filesystem space for temporary files for public-inbox-httpd users. -httpd can fairly share work across clients with our use of psgi_qx; and there's a recent patch series in git@vger with 64 patches in sequence. --- lib/PublicInbox/SolverGit.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/SolverGit.pm') diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm index dfc28d26..39acbe41 100644 --- a/lib/PublicInbox/SolverGit.pm +++ b/lib/PublicInbox/SolverGit.pm @@ -24,6 +24,14 @@ use URI::Escape qw(uri_escape_utf8); use POSIX qw(sysconf _SC_ARG_MAX); my $ARG_SIZE_MAX = (sysconf(_SC_ARG_MAX) || 4096) - 2048; +# By default, "git format-patch" generates filenames with a four-digit +# prefix, so that means 9999 patch series are OK, right? :> +# Maybe we can make this configurable, main concern is disk space overhead +# for uncompressed patch fragments. Aside from space, public-inbox-httpd +# is otherwise unaffected by having many patches, here, as it can share +# work fairly. Other PSGI servers may have trouble, though. +my $MAX_PATCH = 9999; + # di = diff info / a hashref with information about a diff ($di): # { # oid_a => abbreviated pre-image oid, @@ -425,7 +433,7 @@ sub di_url ($$) { sub resolve_patch ($$) { my ($self, $want) = @_; - if (scalar(@{$self->{patches}}) > $self->{max_patch}) { + if (scalar(@{$self->{patches}}) > $MAX_PATCH) { die "Aborting, too many steps to $self->{oid_want}"; } @@ -477,7 +485,6 @@ sub new { bless { gits => $ibx->{-repo_objs}, user_cb => $user_cb, - max_patch => 100, # TODO: config option for searching related inboxes inboxes => [ $ibx ], -- cgit v1.2.3-24-ge0c7