TheClimateCorporation / mandoline

A distributed, versioned, multi-dimensional array database
Other
105 stars 17 forks source link

Fix race condition in cache #8

Closed leon-barrett closed 9 years ago

leon-barrett commented 9 years ago

It was previously possible that this code would look up a value in the cache atom, find it present, and try to return it, only to find that the value had been removed in between. Instead, it's necessary to do all the cache accesses atomically.

stevemkim commented 9 years ago

Very nice. This bug has bothered me for a long time; thanks for fixing it.