]> git.ipfire.org Git - thirdparty/elfutils.git/commit
debugifod: add new table and views for seekable archives
authorOmar Sandoval <osandov@fb.com>
Tue, 23 Jul 2024 22:35:40 +0000 (15:35 -0700)
committerAaron Merey <amerey@redhat.com>
Wed, 24 Jul 2024 22:13:40 +0000 (18:13 -0400)
commit95a09d02b6965c7af201125c8830f0559855bf53
treea6d1cb953086caf3e191536647c6b52923d42d0b
parent484b79bb4a693d46c9653c16b2fc8d2c5ea006d1
debugifod: add new table and views for seekable archives

In order to extract a file from a seekable archive, we need to know
where in the uncompressed archive the file data starts and its size.
Additionally, in order to populate the response headers, we need the
file modification time (since we won't be able to get it from the
archive metadata).  Add a new table, _r_seekable, keyed on the archive
file id and entry file id and containing the size, offset, and mtime.
It also contains the compression type just in case new seekable formats
are supported in the future.

In order to search this table when we get a request, we need the file
ids available.  Add the ids to the _query_d and _query_e views, and
rename them to _query_d2 and _query_e2.

This schema change is backward compatible and doesn't require
reindexing.  _query_d2 and _query_e2 can be renamed back the next time
BUILDIDS needs to be bumped.

Before this change, the database for a single kernel debuginfo RPM
(kernel-debuginfo-6.9.6-200.fc40.x86_64.rpm) was about 15MB.  This
change increases that by about 70kB, only a 0.5% increase.

Signed-off-by: Omar Sandoval <osandov@fb.com>
debuginfod/debuginfod.cxx