From: Eric Wong Date: Sat, 7 Dec 2024 02:05:48 +0000 (+0000) Subject: v2: don't set No_COW for git repos X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3d9232301863a31ac8f5f692a30e942b437682d;p=thirdparty%2Fpublic-inbox.git v2: don't set No_COW for git repos 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. --- diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 257519660..af9aaef32 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; }