From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id F090F1F5AE for ; Tue, 1 Jun 2021 19:14:28 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei_mail_sync: more debug info for uncommitted txn Date: Tue, 1 Jun 2021 19:14:28 +0000 Message-Id: <20210601191428.10320-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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;