Skip to content

Fix racy read on r.namespace

Warren Gifford requested to merge es/fix-race-read into main

Created by: eseliger

go test -race complained about a concurrent read on r.namespace, which actually can occur when the namespace is read and at the same time the namespace is stored in the sync.Once in computeNamespace. This fixes it by introducing a preloadedNamespace property, a pattern we commonly use so I think it's fine to do here as well.

Merge request reports

Loading