From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9808A1F4CA for ; Tue, 19 Nov 2024 21:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1732052873; bh=J6RXh81AoTYqE9ZDiXC18Fm5BVd3yriLJf1Uld2pJbs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oVQhvSg2pKW+DCeAQf5vM6U6Bw7WtLKZ3AA6uCobmVpJmUSctViYy37xwwuIotrTW wrAtQDdQ9jmhdzNScymVe7M9qMufFc/RiNTgKFhdSwW66qZuHene3OAvbL847T7eDf Re/rBM/74ZCwq3oqe/MH1oXO6hW//ax77f9d91EU= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/3] v2writable: done: force synchronous awaitpid Date: Tue, 19 Nov 2024 21:47:52 +0000 Message-ID: <20241119214752.1883670-4-e@80x24.org> In-Reply-To: <20241119214752.1883670-1-e@80x24.org> References: <20241119214752.1883670-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We need to shut down shards synchronously to reliably release the inbox write lock when inside the DS event loop (as the lei/store subprocess is, unlike most v2writable users). While more testing is being conducted, this seems to fix long-running `lei import' failures to lei/store. It seems like a good idea anyways to ensure exit status of shard workers are correct before returning from ->done. --- lib/PublicInbox/V2Writable.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 721fbb4a..9f686bfa 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -579,6 +579,7 @@ sub active { !!$_[0]->{im} } # public sub done { my ($self) = @_; + local $PublicInbox::DS::in_loop; # sync awaitpid in shard_close my $err = ''; if (my $im = delete $self->{im}) { eval { $im->done }; # PublicInbox::Import::done