PR29474: debuginfod
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 15 Aug 2022 10:20:10 +0000 (06:20 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Mon, 15 Aug 2022 10:20:10 +0000 (06:20 -0400)
commit31d6b1fe74ab89138b4d256742997b730dc5cba8
treea96f449cdd963d67a0befdce4adc76d697e96663
parentb713edb9a7f3da8e4dd28ac69a1665ed493ca504
PR29474: debuginfod

Previous code sometimes confused debuginfod with concurrent queries
targeting the same RPM.  One thread fetching & prefetching, the other
thread misinterpreted the sudden presence of its target file in the
fdcache as a mere unnecessary prefetch duplicate.  But if it was the
other thread's target file, previous code would -skip- it completely,
resulting in a 404 error.  New code allows the other thread to also
decompress the target file and return it, and still continue to its
own prefetching process for other files.

There's a performance trade-off here.  Another option would be for the
other thread to check the fdcache regularly and abort its own
prefetch/fetch/prefetch loop early in case of a sudden target file
hit.  That'd save CPU probably but it'd stop prefetching of later
segments of the input archive, which could save future time.

Automated testing is too time/load sensitive to attempt.  Confirmed
working with Martin's stress tester.

Reported-By: Martin Liška <mliska@suse.cz>
Signed-Off-By: Frank Ch. Eigler <fche@redhat.com>
debuginfod/ChangeLog
debuginfod/debuginfod.cxx