Commit 64e12401 authored by Robert Bailey's avatar Robert Bailey

Merge pull request #25141 from jsafrane/devel/fix-store-race

Make threadSafeMap.ListIndexFuncValues thread safe.
parents 71706e0a 42d94073
......@@ -179,6 +179,9 @@ func (c *threadSafeMap) ByIndex(indexName, indexKey string) ([]interface{}, erro
}
func (c *threadSafeMap) ListIndexFuncValues(indexName string) []string {
c.lock.RLock()
defer c.lock.RUnlock()
index := c.indices[indexName]
names := make([]string, 0, len(index))
for key := range index {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment