From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 09A6F1F86C for ; Sat, 28 Nov 2020 07:06:51 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] searchidxshard: chomp $eidx_key from pipe Date: Sat, 28 Nov 2020 07:06:50 +0000 Message-Id: <20201128070650.13191-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 {