]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchidxshard: chomp $eidx_key from pipe
authorEric Wong <e@80x24.org>
Sat, 28 Nov 2020 07:06:50 +0000 (07:06 +0000)
committerEric Wong <e@80x24.org>
Sat, 28 Nov 2020 20:49:56 +0000 (20:49 +0000)
We were accidentally adding "\n" to terms (which Xapian happily
accepts), causing incompatibilities when enabling parallel
sharding in some invocations of -extindex but not others.

This is an extindex incompatibility and starting a new extindex
will be required to take advantage of in-development features,
so it's not urgent to start another one, either.
(other incompatible things may happen before a 1.7 release)

lib/PublicInbox/SearchIdxShard.pm

index 875a9ec92e01220abc56ddf99b6d2c1feb1597cd..dcfeb0beec76c1c9e452cfad24a118e62c1cc007 100644 (file)
@@ -83,11 +83,13 @@ sub shard_worker_loop ($$$$$) {
                } elsif ($line =~ s/\A\+X //) {
                        my ($len, $docid, $oid, $eidx_key) =
                                                        split(/ /, $line, 4);
+                       chomp $eidx_key;
                        $self->add_eidx_info($docid, $oid, $eidx_key,
                                                        eml($r, $len));
                } elsif ($line =~ s/\A-X //) {
                        my ($len, $docid, $oid, $eidx_key) =
                                                        split(/ /, $line, 4);
+                       chomp $eidx_key;
                        $self->remove_eidx_info($docid, $oid, $eidx_key,
                                                        eml($r, $len));
                } else {