Skip to content

Commit

Permalink
bindinfo: add timeout for loading binding from storage
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Mar 6, 2024
1 parent b309018 commit 6531090
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/bindinfo/binding_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (fbc *fuzzyBindingCache) loadFromStore(missingSQLDigest []string) {
for _, sqlDigest := range missingSQLDigest {
bindings, err := fbc.loadBindingFromStorageFunc(sqlDigest)
if err != nil {
logutil.BgLogger().Warn("loadBindingFromStorageFunc binding failed", zap.String("sqlDigest", sqlDigest), zap.Error(err))
logutil.BgLogger().Warn("loadBindingFromStorageFunc failed", zap.String("sqlDigest", sqlDigest), zap.Error(err))
continue
}
// put binding into the cache
Expand Down
1 change: 0 additions & 1 deletion pkg/bindinfo/global_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,6 @@ func (h *globalBindingHandle) LoadBindingsFromStorage(sqlDigest string) (Binding
select {
case result := <-resultChan:
if result.Err != nil {
logutil.BgLogger().Warn("fail to LoadBindingsFromStorageToCache", zap.Error(err))
return nil, result.Err
}
bindings := result.Val
Expand Down

0 comments on commit 6531090

Please sign in to comment.