about summary refs log tree commit homepage
path: root/lib/PublicInbox/SearchIdxShard.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-04-25 11:02:56 +0000
committerEric Wong <e@80x24.org>2023-04-25 20:58:32 +0000
commit8ff2c6532a6e01ee11c3fa06be82f4aad27c18bf (patch)
tree66f1df9539af540bcee900649b6cead6bce158bb /lib/PublicInbox/SearchIdxShard.pm
parent3d4ed2e459c543f5c6fd9db615cd61d81584553f (diff)
downloadpublic-inbox-8ff2c6532a6e01ee11c3fa06be82f4aad27c18bf.tar.gz
We'll also drop the "\n" for die() to make diagnostics easier.
There's no known bugs in this area, just consistency
improvements and LoC reduction.
Diffstat (limited to 'lib/PublicInbox/SearchIdxShard.pm')
-rw-r--r--lib/PublicInbox/SearchIdxShard.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm
index 831be51b..21bd56c2 100644
--- a/lib/PublicInbox/SearchIdxShard.pm
+++ b/lib/PublicInbox/SearchIdxShard.pm
@@ -32,12 +32,10 @@ sub new {
         $self;
 }
 
-sub _worker_done {
+sub _worker_done { # OnDestroy cb
         my ($self) = @_;
-        if ($self->need_xapian) {
-                die "$$ $0 xdb not released\n" if $self->{xdb};
-        }
-        die "$$ $0 still in transaction\n" if $self->{txn};
+        die "BUG: $$ $0 xdb active" if $self->need_xapian && $self->{xdb};
+        die "BUG: $$ $0 txn active" if $self->{txn};
 }
 
 sub ipc_atfork_child { # called automatically before ipc_worker_loop
@@ -64,7 +62,7 @@ sub echo {
 
 sub idx_close {
         my ($self) = @_;
-        die "transaction in progress $self\n" if $self->{txn};
+        die "BUG: $$ $0 txn active" if $self->{txn};
         $self->idx_release if $self->{xdb};
 }