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 42CCF1F4CC for ; Sat, 7 Dec 2024 02:05:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1733537148; bh=MnGixBOUrcpADtfF2lKDybLNHxEnDrqUa5GTKWLr4Pc=; h=From:To:Subject:Date:From; b=rGoQh+tUvj5SoiJ9EWVnEB0cCuruS5IjZDxWXv+2CoC2rlviTv/0UCIfKdD07gAvW iKet7TxcuHlGzPL8wcIwl+zVKamdsu6OiSJBhKXYrv3hACvb2JrTrAhGfq7vr8EZmA U7U+Ey2ooxsVAadaYY4G8rHAUy/fROl9j/Nu9xsY= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] v2: don't set No_COW for git repos Date: Sat, 7 Dec 2024 02:05:48 +0000 Message-ID: <20241207020548.3379941-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Unlike Xapian and SQLite DBs, data stored in git is both precious and written sequentially. Thus disabling copy-on-write doesn't make sense for git objects since the problems with copy-on-write don't apply here while the benefits of CoW do. --- lib/PublicInbox/V2Writable.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 25751966..af9aaef3 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -82,11 +82,11 @@ sub init_inbox { $self->{parallel} = 0 if $shards == 0; $self->{shards} = $shards if $shards > 0; } - $self->idx_init; - $self->{mm}->skip_artnum($skip_artnum) if defined $skip_artnum; my $max = $self->{ibx}->max_git_epoch; $max = $skip_epoch if (defined($skip_epoch) && !defined($max)); $self->{mg}->add_epoch($max // 0); + $self->idx_init; + $self->{mm}->skip_artnum($skip_artnum) if defined $skip_artnum; $self->done; }