Skip to content

Commit ac70ae9

Browse files
authored
store: fix panic when failed to create pdclient (#42885) (#42894)
ref #42778
1 parent 7376954 commit ac70ae9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

store/driver/tikv_driver.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,10 @@ func (d TiKVDriver) OpenWithOptions(path string, options ...Option) (kv.Storage,
160160
),
161161
pd.WithCustomTimeoutOption(time.Duration(d.pdConfig.PDServerTimeout)*time.Second),
162162
pd.WithForwardingOption(config.GetGlobalConfig().EnableForwarding))
163-
pdCli = util.InterceptedPDClient{Client: pdCli}
164-
165163
if err != nil {
166164
return nil, errors.Trace(err)
167165
}
166+
pdCli = util.InterceptedPDClient{Client: pdCli}
168167

169168
// FIXME: uuid will be a very long and ugly string, simplify it.
170169
uuid := fmt.Sprintf("tikv-%v", pdCli.GetClusterID(context.TODO()))

0 commit comments

Comments
 (0)