MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / fetchAndLoadDatabase

Method fetchAndLoadDatabase

rest/config.go:1725–1729  ·  view source on GitHub ↗
(nonContextStruct base.NonCancellableContext, dbName string, forceReload bool)

Source from the content-addressed store, hash-verified

1723}
1724
1725func (sc *ServerContext) fetchAndLoadDatabase(nonContextStruct base.NonCancellableContext, dbName string, forceReload bool) (found bool, err error) {
1726 sc._databasesLock.Lock()
1727 defer sc._databasesLock.Unlock()
1728 return sc._fetchAndLoadDatabase(nonContextStruct, dbName, forceReload)
1729}
1730
1731// _fetchAndLoadDatabase will attempt to find the given database name first in a matching bucket name,
1732// but then fall back to searching through configs in each bucket to try and find a config.

Callers 2

GetInactiveDatabaseMethod · 0.95
handlePutDbConfigMethod · 0.80

Calls 3

_fetchAndLoadDatabaseMethod · 0.95
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected