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-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 AE1451FC0C for ; Wed, 24 Mar 2021 09:23:36 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 8/9] lei_mirror: fix circular reference Date: Wed, 24 Mar 2021 14:23:34 +0500 Message-Id: <20210324092335.12345-9-e@80x24.org> In-Reply-To: <20210324092335.12345-1-e@80x24.org> References: <20210324092335.12345-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: All of our $lei->workers_start callers can simply rely on that wrapper to do the right thing and pass fields to ->wq_worker_start children, only. This could manifest as a unbound memory growth if somebody is constantly mirroring, and was causing tests to get stuck when experimenting with a persistent lei-daemon for the entire test suite. --- lib/PublicInbox/LeiMirror.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm index 6e62625d..d68cd6c1 100644 --- a/lib/PublicInbox/LeiMirror.pm +++ b/lib/PublicInbox/LeiMirror.pm @@ -268,7 +268,7 @@ sub do_mirror { # via wq_io_do sub start { my ($cls, $lei, $src, $dst) = @_; - my $self = bless { lei => $lei, src => $src, dst => $dst }, $cls; + my $self = bless { src => $src, dst => $dst }, $cls; if ($src =~ m!https?://!) { require URI; require PublicInbox::LeiCurl;