]> git.mjollnir.org Git - moodle.git/commit
accesslib: mark_context_dirty() - fix race condition
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:23:01 +0000 (07:23 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:23:01 +0000 (07:23 +0000)
commit8e9fa6b1a282f22cc0972640168ccd2e694f5062
treebf075e2aca529073a9f487df9531134d22e35a06
parent16cb1ef759f6800453e10570d14098054caec7ce
accesslib: mark_context_dirty() - fix race condition

We had a 1s race condition where a user could get their rights loaded
at the exact time an admin is changing roles/caps and see the "old"
data. Or even see a half-updated view of the access controls.

Yuck.

So we fix the race condition backdating the dirtyness. Cheap, but
effective. And then we backdate it some more to cover for minor clock
flutter on clusters (you still need ntp however!).
lib/accesslib.php