Skip to content

Add thread-safety to garbage collect maps

With the use of a small utility struct, this MR ensures that all, map accesses are thread-safe via to use of a mutex.

While most operations accomplished through the provided struct methods, the final range over the blobs to be deleted uses the mutex and accesses the set members directly. By this point in the process, only one goroutine should be accessing the deleteSet, so holding the lock open until the end of the loop will reduce the number lock operations.

Edited by Hayley Swimelar

Merge request reports