Bug 27711 - grooming should process -I/-X
Summary: grooming should process -I/-X
Status: RESOLVED FIXED
Alias: None
Product: elfutils
Classification: Unclassified
Component: debuginfod (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Noah Sanci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-08 15:58 UTC by Frank Ch. Eigler
Modified: 2021-07-09 13:58 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Ch. Eigler 2021-04-08 15:58:20 UTC
The debuginfod -I/-X regexes operate during traversal to identify those files in need of scanning.  The regexes are not used during grooming.  This means that if from run to run, the regex changes so that formerly indexed files are excluded from traversal, the data is still retained in the index.

This is both good and bad.  On one hand, if the underlying data is still available, grooming will preserve the data, and let clients ask for it.  On the other hand, if the growing index size is a problem, and one wishes to age no-longer-regex-matching index data out, there is no way.

Let's add a debuginfod flag to use regexes during grooming.  Specifically, in groom(), where the stat() test exists, also check for regex matching as in scan_source_paths().  Treat failure of the regex the same way as though the file didn't exist.
Comment 1 Mark Wielaard 2021-07-09 13:58:04 UTC
commit 0ae9b791b47cdee92ac7221e3eead79c83a64a40
Author: Noah <nsanci@redhat.com>
Date:   Wed Jul 7 14:40:10 2021 -0400

    debuginfod: PR27711 - Use -I/-X regexes during groom phase
    
    The debuginfod -I/-X regexes operate during traversal to identify
    those files in need of scanning.  The regexes are not used during
    grooming.  This means that if from run to run, the regex changes so
    that formerly indexed files are excluded from traversal, the data is
    still retained in the index.
    
    This is both good and bad.  On one hand, if the underlying data is
    still available, grooming will preserve the data, and let clients ask
    for it.  On the other hand, if the growing index size is a problem,
    and one wishes to age no-longer-regex-matching index data out, there
    is no way.
    
    Let's add a debuginfod flag to use regexes during grooming.
    Specifically, in groom(), where the stat() test exists, also check
    for regex matching as in scan_source_paths().  Treat failure of the
    regex the same way as though the file didn't exist.
    
    Signed-off-by: Noah Sanci <nsanci@redhat.com>