about summary refs log tree commit homepage
path: root/t/extsearch.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-07-25 12:44:23 +0000
committerEric Wong <e@80x24.org>2021-07-25 21:08:03 +0000
commit7a85c3cd6c7c0257a04343ca345cf0f23d71729c (patch)
tree0e53e195ae11c14b14fa7cf9af4ef72b1a739857 /t/extsearch.t
parentcef5cda178a0e57c69ba19b6aed6b7eba1ee7594 (diff)
downloadpublic-inbox-7a85c3cd6c7c0257a04343ca345cf0f23d71729c.tar.gz
This wasn't wired up properly, but Xapian appears to suffer from
I/O amplification problems as DB shards get larger:

  https://lists.xapian.org/pipermail/xapian-discuss/2019-February/009727.html
  <23640.32170.703368.841021@y.dockes.com>

Of course, we shouldn't have too many shards, either; because
performance problems with too many shards was the entire reason
extindex was created:

  https://lists.xapian.org/pipermail/xapian-discuss/2020-August/009823.html
  <20200826064728.GA32239@dcvr>
Diffstat (limited to 't/extsearch.t')
-rw-r--r--t/extsearch.t11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/extsearch.t b/t/extsearch.t
index 46a6f2ec..1f62e80c 100644
--- a/t/extsearch.t
+++ b/t/extsearch.t
@@ -411,4 +411,15 @@ if ('dedupe + dry-run') {
                 '--dry-run alone fails');
 }
 
+for my $j (1, 3, 6) {
+        my $o = { 2 => \(my $err = '') };
+        my $d = "$home/extindex-j$j";
+        ok(run_script(['-extindex', "-j$j", '--all', $d], undef, $o),
+                "init with -j$j");
+        my $max = $j - 2;
+        $max = 0 if $max < 0;
+        my @dirs = glob("$d/ei*/?");
+        like($dirs[-1], qr!/ei[0-9]+/$max\z!, '-j works');
+}
+
 done_testing;