As raised in this comment, there is a race conditions when performing authorization checks. A concurrent hashmap is used to cache the checks, but the read and the write to such map do not happen atomically.
Thus, it's possible for 2 threads from concurrent requests to believe there is no cached check, each starts its own check and just one of them gets added to the map.
This is likely harmless for now, just wasteful.
As raised in this comment, there is a race conditions when performing authorization checks. A concurrent hashmap is used to cache the checks, but the read and the write to such map do not happen atomically.
Thus, it's possible for 2 threads from concurrent requests to believe there is no cached check, each starts its own check and just one of them gets added to the map.
This is likely harmless for now, just wasteful.