Skip to content

Commit a465b18

Browse files
authored
domain: use PutKVToEtcd in NotifyUpdateSysVarCache to avoid stuck by etcd operation (#61154)
close #60665
1 parent 1d4514a commit a465b18

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/domain/domain.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3075,8 +3075,7 @@ func (do *Domain) notifyUpdatePrivilege(event PrivilegeEvent) error {
30753075
// synchronously so that the effect is immediate.
30763076
func (do *Domain) NotifyUpdateSysVarCache(updateLocal bool) {
30773077
if do.etcdClient != nil {
3078-
row := do.etcdClient.KV
3079-
_, err := row.Put(context.Background(), sysVarCacheKey, "")
3078+
err := ddlutil.PutKVToEtcd(context.Background(), do.etcdClient, ddlutil.KeyOpDefaultRetryCnt, sysVarCacheKey, "")
30803079
if err != nil {
30813080
logutil.BgLogger().Warn("notify update sysvar cache failed", zap.Error(err))
30823081
}

0 commit comments

Comments
 (0)