Fix locking issues in state cache
In GetStorage() and get(), avoid potential concurrent duplicate backend
calls for the same entry by taking a write lock. This does increase
the time the cache is write locked.
Also avoid leaving the cache locked in early exit from the iterate
functions.
Signed-off-by:
Sean Young <sean.young@monax.io>
Loading
Please register or sign in to comment