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

Method removeNonExistingConfigs

rest/config.go:416–425  ·  view source on GitHub ↗

removeNonExistingConfigs will remove any configs from invalid config tracking map that aren't present in fetched configs

(fetchedConfigs map[string]bool)

Source from the content-addressed store, hash-verified

414
415// removeNonExistingConfigs will remove any configs from invalid config tracking map that aren't present in fetched configs
416func (d *invalidDatabaseConfigs) removeNonExistingConfigs(fetchedConfigs map[string]bool) {
417 d.m.Lock()
418 defer d.m.Unlock()
419 for dbName := range d.dbNames {
420 if ok := fetchedConfigs[dbName]; !ok {
421 // this invalid db config was not found in config polling, so lets remove
422 delete(d.dbNames, dbName)
423 }
424 }
425}
426
427// inheritFromBootstrap sets any empty Couchbase Server values from the given bootstrap config.
428func (dbc *DbConfig) inheritFromBootstrap(b BootstrapConfig) {

Callers 1

FetchConfigsMethod · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected