diff --git a/rest/config.go b/rest/config.go index c7c2a9fdcd..1f810e94db 100644 --- a/rest/config.go +++ b/rest/config.go @@ -1459,6 +1459,8 @@ func (sc *ServerContext) fetchAndLoadDatabaseSince(ctx context.Context, dbName s } func (sc *ServerContext) fetchAndLoadDatabase(nonContextStruct base.NonCancellableContext, dbName string) (found bool, err error) { + sc.lock.Lock() + defer sc.lock.Unlock() return sc._fetchAndLoadDatabase(nonContextStruct, dbName) }