Issue Details (XML | Word | Printable)

Key: MDL-19288
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Petr Škoda (skodak)
Reporter: Petr Škoda (skodak)
Votes: 0
Watchers: 3
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Context and modinfo caching regressions on large sites

Created: 24/May/09 04:00 AM   Updated: 17/Oct/09 12:20 AM
Component/s: Roles
Affects Version/s: 1.9.5
Fix Version/s: 1.9.6

Issue Links:
Relates
 

Participants: Colin Campbell, Petr Škoda (skodak) and Sam Hemelryk
Security Level: None
QA Assignee: Sam Hemelryk
Resolved date: 24/May/09
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
the array_shift() call is not correct because it reorders the array - see MDL-18768

From MDL-18768, by Colin Campbell:
I am running into issues with this fix. The array_shift function renumbers numeric indexes. Consequently, as soon as we reach MAX_MODINFO_CACHE_SIZE in get_fast_modinfo, array_shift converts the cache keys from the course ids originally used to index the cache to sequential integers starting with zero. This causes all sorts of bad things to happen.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Škoda (skodak) added a comment - 24/May/09 04:09 AM
fixed, going to add note into release notes

Petr Škoda (skodak) added a comment - 24/May/09 04:14 AM
All credit goes to Colin Campbell, thanks a lot!

Colin Campbell added a comment - 24/May/09 08:30 AM
I see the fix to lib/accesslib.php. A similar defect was introduced at the same time in course/lib.php (which is actually the one that I was looking closely at). Please see the use of MAX_MODINFO_CACHE_SIZE in get_fast_modinfo. Thanks for addressing this issue so quickly.

Petr Škoda (skodak) added a comment - 24/May/09 03:14 PM
oh, sorry - reopening

Petr Škoda (skodak) added a comment - 24/May/09 03:26 PM
reclosing, thanks a lot!

Sam Hemelryk added a comment - 02/Jun/09 09:47 AM
Hi guys, everything looks good, thanks