diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-30 01:20:40 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-30 01:20:59 +0000 |
commit | 62fc4208337b5ea07240bfaa3a8ee5d670b75f72 (patch) | |
tree | 0c03c844002086d1a2489cecada149c26ee121e8 /lib/PublicInbox/Search.pm | |
parent | 34bc77692cb57a13dda5b8e7ea1c43fbccfec0af (diff) | |
download | public-inbox-62fc4208337b5ea07240bfaa3a8ee5d670b75f72.tar.gz |
-watch on a busy/giant Maildir caused too many Xapian errors while attempting to browse.
Diffstat (limited to 'lib/PublicInbox/Search.pm')
-rw-r--r-- | lib/PublicInbox/Search.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm index 5fc7682c..de296e1a 100644 --- a/lib/PublicInbox/Search.pm +++ b/lib/PublicInbox/Search.pm @@ -215,18 +215,20 @@ sub get_thread { sub retry_reopen { my ($self, $cb) = @_; my $ret; - for (1..10) { + for my $i (1..10) { eval { $ret = $cb->() }; return $ret unless $@; # Exception: The revision being read has been discarded - # you should call Xapian::Database::reopen() if (ref($@) eq 'Search::Xapian::DatabaseModifiedError') { + warn "reopen try #$i on $@\n"; reopen($self); } else { warn "ref: ", ref($@), "\n"; die; } } + die "Too many Xapian database modifications in progress\n"; } sub _do_enquire { |