From ef06085156e3abf440233e1c90bcaab38a533bc4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Jun 2021 19:14:28 +0000 Subject: lei_mail_sync: more debug info for uncommitted txn I'm not actually sure if I hit an uncommitted transaction just now, it doesn't seem like it. --- lib/PublicInbox/LeiMailSync.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/LeiMailSync.pm b/lib/PublicInbox/LeiMailSync.pm index 36cd564c..22ee1109 100644 --- a/lib/PublicInbox/LeiMailSync.pm +++ b/lib/PublicInbox/LeiMailSync.pm @@ -392,10 +392,11 @@ sub imap_oid { # warnings, not sure what... sub DESTROY { my ($self) = @_; - my $dbh = $self->{dbh} or return; + my $dbh = delete($self->{dbh}) or return; return if $dbh->{ReadOnly}; use Carp; - warn "BUG $$ $0 $self {dbh} UNCOMMITTED ", Carp::longmess(); + undef $dbh; + warn "BUG $$ $0 $self {dbh} OPEN ppid=".getppid.' '.Carp::longmess(); } 1; -- cgit v1.2.3-24-ge0c7