Rebase to 4.18.0-beta1

This commit is contained in:
Panu Matilainen 2022-06-28 15:34:54 +03:00
parent 75045b9669
commit 8b4a3685d4
4 changed files with 7 additions and 43 deletions

1
.gitignore vendored
View File

@ -52,3 +52,4 @@
/rpm-4.17.0.tar.bz2
/rpm-4.18.0-alpha1.tar.bz2
/rpm-4.18.0-alpha2.tar.bz2
/rpm-4.18.0-beta1.tar.bz2

View File

@ -1,39 +0,0 @@
From 33c8b214425c2860fdfe485d597e210b9723a792 Mon Sep 17 00:00:00 2001
Message-Id: <33c8b214425c2860fdfe485d597e210b9723a792.1653292401.git.pmatilai@redhat.com>
From: Panu Matilainen <pmatilai@redhat.com>
Date: Mon, 23 May 2022 10:42:13 +0300
Subject: [PATCH] Prevent uncontrolled sqlite WAL growth during large
transactions
Sqlite WAL threshold of 1000 pages is way too low for rpmdb as a single
header often exceeds that, but disabling the checkpointing entirely can
cause the WAL to grow to multiple gigabytes during large distro update
transactions, which isn't healty either. Bump the threshold to 10000
pages which caps the WAL size to tens of megabytes, which hopefully
is a reasonable balance between performance on rotational disks (anybody
remember those?) and diskpace consumption.
Also drop no longer meaningful link to %_flush_io configuration.
---
lib/backend/sqlite.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/backend/sqlite.c b/lib/backend/sqlite.c
index 31f77e845..d5389736b 100644
--- a/lib/backend/sqlite.c
+++ b/lib/backend/sqlite.c
@@ -180,9 +180,8 @@ static int sqlite_init(rpmdb rdb, const char * dbhome)
int one = 1;
/* Annoying but necessary to support non-privileged readers */
sqlite3_file_control(sdb, NULL, SQLITE_FCNTL_PERSIST_WAL, &one);
-
- if (!rpmExpandNumeric("%{?_flush_io}"))
- sqlexec(sdb, "PRAGMA wal_autocheckpoint = 0");
+ /* Sqlite default threshold is way too low for rpmdb */
+ sqlexec(sdb, "PRAGMA wal_autocheckpoint = 10000");
}
}
--
2.35.3

View File

@ -29,8 +29,8 @@
%define rpmhome /usr/lib/rpm
%global rpmver 4.18.0
%global snapver alpha2
%global baserelease 2
%global snapver beta1
%global baserelease 1
%global sover 9
%global srcver %{rpmver}%{?snapver:-%{snapver}}
@ -56,7 +56,6 @@ Patch1: rpm-4.17.x-siteconfig.patch
Patch3: rpm-4.9.90-no-man-dirs.patch
# Patches already upstream:
Patch100: 0001-Prevent-uncontrolled-sqlite-WAL-growth-during-large-.patch
# These are not yet upstream
Patch906: rpm-4.7.1-geode-i686.patch
@ -611,6 +610,9 @@ fi
%doc docs/librpm/html/*
%changelog
* Tue Jun 28 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.beta1.1
- Rebase to 4.18.0-beta1 (https://rpm.org/wiki/Releases/4.18.0)
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.18.0-0.alpha2.2
- Rebuilt for Python 3.11

View File

@ -1 +1 @@
SHA512 (rpm-4.18.0-alpha2.tar.bz2) = 76282bbcdf7cfb3b6240ef2e2650cfbee784bddbfa85a09a92c02038e44b19cf8f20bf94b6d5464773d04ee838e136b788506ca28bdf36ed3a017c8e7172990e
SHA512 (rpm-4.18.0-beta1.tar.bz2) = 4476c9e679e0ac622323e80212404dc062884d1f38923ab824a64e1120bd7c1586379709feae824628425222567e4f338fcba0104e2ae285909df249adcf96c8