user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] searchidxshard: chomp $eidx_key from pipe
@ 2020-11-28  7:06 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2020-11-28  7:06 UTC (permalink / raw)
  To: meta

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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm
index 875a9ec9..dcfeb0be 100644
--- a/lib/PublicInbox/SearchIdxShard.pm
+++ b/lib/PublicInbox/SearchIdxShard.pm
@@ -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 {

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-28  7:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-28  7:06 [PATCH] searchidxshard: chomp $eidx_key from pipe Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).