* [PATCH] v2: don't set No_COW for git repos
@ 2024-12-07 2:05 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2024-12-07 2:05 UTC (permalink / raw)
To: meta
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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-07 2:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-07 2:05 [PATCH] v2: don't set No_COW for git repos Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).