View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024821 | mantisbt | code cleanup | public | 2018-10-03 09:57 | 2019-03-16 20:20 |
Reporter | jweberhofer | Assigned To | cproensa | ||
Priority | high | Severity | major | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 2.17.1 | ||||
Target Version | 2.20.0 | Fixed in Version | 2.20.0 | ||
Summary | 0024821: Wrong caching in version API | ||||
Description | While searching solutions for 0017145 I was reviewing the version_api.php -> version_get_all_rows() function and found a potential issue: The function can be invoked with filters for $p_released and $p_obsolete as well as an additional query $p_inherit. At the first run everything works fine because data are retrieved via a database query. This result is going to be cached. Subsequent calls don't re-query the database but will re-use the former result. As this is potentially pre-filtered, the cached result-list will potentially contain not all results and therefore return wrong lists. I could refactor that, please tell me if you are interested in... | ||||
Tags | No tags attached. | ||||
MantisBT: master 46c77ace 2019-02-11 14:35 Committer: vboctor Details Diff |
Rewrite project versions cache Rewrite `version_get_all_rows` so it doesn't perform db queries and rely in `version_cache_array_rows`. Rewrite `version_cache_array_rows`to clean up code and improve caching for non existant projects (eg, ALL_PROJECTS), or projects with no versions. Both changes fixes - A recurrent cache miss when ALL_PROJECT was part of the inheritance projects scope in a query for versions for a project. - A potentially wrong cached response for project versions (see 0024821). Fixes: 0023245, 0024821 |
Affected Issues 0023245, 0024821, 0025661 |
|
mod - core/bug_group_action_api.php | Diff File | ||
mod - core/version_api.php | Diff File |