about summary refs log tree commit homepage
path: root/lib/PublicInbox/XapHelper.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2024-05-19 21:55:02 +0000
committerEric Wong <e@80x24.org>2024-05-20 18:29:40 +0000
commita671b67854b5ad7811d4df7f83ff06148aeddb2e (patch)
treeddaca5a79d0693bb75fd9bbccf2286a540d41e93 /lib/PublicInbox/XapHelper.pm
parent87d944b6039667735884e37baff4f9fa94aca5db (diff)
downloadpublic-inbox-a671b67854b5ad7811d4df7f83ff06148aeddb2e.tar.gz
In addition to the shards which comprise the xap_helper search
instance, we also account for changes in altid and indexheader
in case xap_helper lifetime exceeds the given
PublicInbox::Config.

xap_helper will be Config lifetime agnostic since it's possible
to run -netd and -httpd instances with multiple Config files,
but a single xap_helper instance (with workers) should be able
to service all of them.
Diffstat (limited to 'lib/PublicInbox/XapHelper.pm')
-rw-r--r--lib/PublicInbox/XapHelper.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/XapHelper.pm b/lib/PublicInbox/XapHelper.pm
index c9957f64..f1311bd4 100644
--- a/lib/PublicInbox/XapHelper.pm
+++ b/lib/PublicInbox/XapHelper.pm
@@ -190,7 +190,8 @@ sub dispatch {
         $GLP->getoptionsfromarray(\@argv, $req, @PublicInbox::Search::XH_SPEC)
                 or return;
         my $dirs = delete $req->{d} or die 'no -d args';
-        my $key = join("\0", @$dirs);
+        my $key = "-d\0".join("\0-d\0", @$dirs);
+        $key .= "\0".join("\0", map { ('-Q', $_) } @{$req->{Q}}) if $req->{Q};
         my $new;
         $req->{srch} = $SRCH{$key} //= do {
                 $new = { qp_flags => $PublicInbox::Search::QP_FLAGS };