[Rpm-maint] [rpm-software-management/rpm] Vacuum the sqlite rpmdb if necessary (PR #3452)

Florian Festi notifications at github.com
Mon Nov 18 10:40:00 UTC 2024


@ffesti commented on this pull request.



>  		sqlexec(sdb, "PRAGMA optimize");
 		sqlexec(sdb, "PRAGMA wal_checkpoint = TRUNCATE");
+
+		int max_size = rpmExpandNumeric("%{?_sqlite_vacuum}");
+		if (max_size <= 0)
+		    max_size = 20*1024*1024;
+		long free_space = sqlite_free_space(sdb);

Yeah, I have been pondering about int vs long vs int64_t here.

rpmExpandNumeric also only returns an `int`. I wonder if we should at least move the C++ variant to 64 bits. Not that we need it here urgently but adding a 32 bit API seems kinda wrong.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3452#discussion_r1846349129
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3452/review/2442238027 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241118/b8913bf3/attachment.htm>


More information about the Rpm-maint mailing list