Summary: | client should cache negative results | ||
---|---|---|---|
Product: | elfutils | Reporter: | Aaron Merey <amerey> |
Component: | debuginfod | Assignee: | Alice Zhang <alizhang> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | elfutils-devel, fche |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Aaron Merey
2020-03-03 16:09:21 UTC
debuginfod misses are pretty quick tho - maybe it's harmless? If these are to be cached, they shouldn't be cached too long, as the data could appear later. (In reply to Frank Ch. Eigler from comment #1) > debuginfod misses are pretty quick tho - maybe it's harmless? If these are > to be cached, they shouldn't be cached too long, as the data could appear > later. Some delay is noticeable when doing multiple queries over a short time. Usually harmless but I think control over this may improve user experience. Another config file could be added to the top level of the cache to control how long to wait until querying the server again for these files. If we are worried about missing server updates then a default of 0 may be appropriate. Suggest implementing this via: - map a 404 result code to an empty 000-permission file in the debuginfod client cache - when querying for a buildid, if the cache includes such a 000-permission file, check its fstat - if the fstat mtime is older than the configuration parameter from the file .cache/cache_miss_s, then unlink the 000 file and proceed with a new query - if the fstat mtime is newer, then the 000 file is fresh, so return a 404/ENOENT equivalent to the debuginfod client application - a good default for cache_miss_s could be 600 (10 minutes) commit 5f72c51a7e5c02be833d78c8412a8083f2212dcf Author: Alice Zhang via Elfutils-devel <elfutils-devel@sourceware.org> Date: Tue May 4 16:25:59 2021 -0400 debuginfod: debuginfod client should cache negative results. Add debuginfod_config_cache for reading and writing to cache configuration files, make use of the function within debuginfod_clean_cache and debuginfod_query_server. |