MCPcopy
hub / github.com/pingcap/tidb / SetStorage

Method SetStorage

br/pkg/restore/log_client/client.go:438–445  ·  view source on GitHub ↗
(ctx context.Context, backend *backuppb.StorageBackend, opts *storage.ExternalStorageOptions)

Source from the content-addressed store, hash-verified

436}
437
438func (rc *LogClient) SetStorage(ctx context.Context, backend *backuppb.StorageBackend, opts *storage.ExternalStorageOptions) error {
439 var err error
440 rc.storage, err = storage.New(ctx, backend, opts)
441 if err != nil {
442 return errors.Trace(err)
443 }
444 return nil
445}
446
447func (rc *LogClient) SetCurrentTS(ts uint64) error {
448 if ts == 0 {

Callers 3

createLogClientFunction · 0.95
TestPITRIDMapOnStorageFunction · 0.45

Calls 1

NewFunction · 0.92

Tested by 2

TestPITRIDMapOnStorageFunction · 0.36