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

Method _handleInvalidDatabaseConfig

rest/config.go:1885–1890  ·  view source on GitHub ↗
(ctx context.Context, bucket string, cnf DatabaseConfig, databaseErr *db.DatabaseError)

Source from the content-addressed store, hash-verified

1883}
1884
1885func (sc *ServerContext) _handleInvalidDatabaseConfig(ctx context.Context, bucket string, cnf DatabaseConfig, databaseErr *db.DatabaseError) {
1886 // track corrupt database context
1887 sc.invalidDatabaseConfigTracking.addInvalidDatabase(ctx, cnf.Name, cnf, bucket, databaseErr)
1888 // don't load config + remove from server context (apart from corrupt database map)
1889 sc._removeDatabase(ctx, cnf.Name)
1890}
1891
1892func (sc *ServerContext) bucketNameFromDbName(ctx context.Context, dbName string) (bucketName string, found bool) {
1893 // Minimal representation of config struct to be tolerant of invalid database configurations where we still need to find a database name

Calls 2

_removeDatabaseMethod · 0.95
addInvalidDatabaseMethod · 0.80

Tested by

no test coverage detected