(ctx context.Context, config DatabaseConfig, failFast bool, loadFromBucket bool)
| 575 | } |
| 576 | |
| 577 | func (sc *ServerContext) _reloadDatabaseWithConfig(ctx context.Context, config DatabaseConfig, failFast bool, loadFromBucket bool) error { |
| 578 | sc._removeDatabase(ctx, config.Name) |
| 579 | // use async initialization whenever using persistent config |
| 580 | asyncOnline := sc.persistentConfig |
| 581 | _, err := sc._getOrAddDatabaseFromConfig(ctx, config, getOrAddDatabaseConfigOptions{ |
| 582 | useExisting: false, |
| 583 | failFast: failFast, |
| 584 | asyncOnline: asyncOnline, |
| 585 | loadFromBucket: loadFromBucket, |
| 586 | }) |
| 587 | return err |
| 588 | } |
| 589 | |
| 590 | // Adds a database to the ServerContext. Attempts a read after it gets the write |
| 591 | // lock to see if it's already been added by another process. If so, returns either the |
no test coverage detected