]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei_mail_sync: more debug info for uncommitted txn
authorEric Wong <e@80x24.org>
Tue, 1 Jun 2021 19:14:28 +0000 (19:14 +0000)
committerEric Wong <e@80x24.org>
Tue, 1 Jun 2021 19:15:54 +0000 (19:15 +0000)
I'm not actually sure if I hit an uncommitted transaction just
now, it doesn't seem like it.

lib/PublicInbox/LeiMailSync.pm

index 36cd564cd7477467b75e1f28ff6428c10af3b499..22ee1109cc7e13ba9681fb08fe12c5c35e43dce7 100644 (file)
@@ -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;