Skip to content

Commit

Permalink
privilege, domain: reduce the memory jitter of privilege reload activ…
Browse files Browse the repository at this point in the history
…ity for 2M users (#59487)

ref #55563, close #59403
  • Loading branch information
tiancaiamao authored Feb 27, 2025
1 parent ba9f6ff commit b61e0e1
Show file tree
Hide file tree
Showing 4 changed files with 498 additions and 429 deletions.
2 changes: 1 addition & 1 deletion pkg/domain/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1953,7 +1953,7 @@ func (do *Domain) LoadPrivilegeLoop(sctx sessionctx.Context) error {
if err != nil {
return err
}
do.privHandle = privileges.NewHandle(sctx.GetRestrictedSQLExecutor(), sctx.GetSessionVars().GlobalVarsAccessor)
do.privHandle = privileges.NewHandle(do.SysSessionPool(), sctx.GetSessionVars().GlobalVarsAccessor)

var watchCh clientv3.WatchChan
duration := 5 * time.Minute
Expand Down
Loading

0 comments on commit b61e0e1

Please sign in to comment.