-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.4
-
MOODLE_404_STABLE
-
The aquire_lock method currently both sets and updates key's in redis, but could be kept to only setting them. This makes more sense and is simpler.
Currently it does the following:
- Set's the new lock if it doesn't exist in one go
- Updates the key in redis with an expiry
This seems risky, what if it somehow crashes before an expiry is set? It will be locked forever!
Shouldn't it do the following?:
- Check if lock exists
- Set the new lock with expiry in one go
This removes the previous mentioned risk and seems more simple.
- Testing discovered
-
MDL-80978 Implement Redis redlock
- Open