user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] extsearchidx: do not process eidxq w/o config
@ 2021-10-01 21:44 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2021-10-01 21:44 UTC (permalink / raw)
  To: meta

When indexing a single inbox, do not attempt reindexing code
paths without a full config, otherwise ordering comparisons
won't work.
---
 lib/PublicInbox/ExtSearchIdx.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index c34225b29d9a..f0992e5ea1c1 100644
--- a/lib/PublicInbox/ExtSearchIdx.pm
+++ b/lib/PublicInbox/ExtSearchIdx.pm
@@ -688,6 +688,7 @@ sub prep_id2pos ($) {
 
 sub eidxq_process ($$) { # for reindexing
 	my ($self, $sync) = @_;
+	return unless $self->{cfg};
 
 	return unless eidxq_lock_acquire($self);
 	my $dbh = $self->{oidx}->dbh;
@@ -882,6 +883,7 @@ sub _reindex_inbox ($$$) {
 
 sub eidx_reindex {
 	my ($self, $sync) = @_;
+	return unless $self->{cfg};
 
 	# acquire eidxq_lock early because full reindex takes forever
 	# and incremental -extindex processes can run during our checkpoints

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

only message in thread, other threads:[~2021-10-01 21:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 21:44 [PATCH] extsearchidx: do not process eidxq w/o config 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).