Skip to content

Commit

Permalink
enhance: [2.4] clean up logs of empty op key (#39395)
Browse files Browse the repository at this point in the history
cherry-pick from master: #39335
related: #39334

Signed-off-by: shaoting-huang <[email protected]>
  • Loading branch information
shaoting-huang authored Jan 20, 2025
1 parent e94604f commit 5853f02
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions internal/rootcoord/root_coord.go
Original file line number Diff line number Diff line change
Expand Up @@ -2724,12 +2724,14 @@ func (c *Core) OperatePrivilege(ctx context.Context, in *milvuspb.OperatePrivile
})
})
}
if err := c.proxyClientManager.RefreshPolicyInfoCache(ctx, &proxypb.RefreshPolicyInfoCacheRequest{
OpType: opType,
OpKey: funcutil.PolicyForPrivileges(expandGrants),
}); err != nil {
log.Warn("fail to refresh policy info cache", zap.Any("in", in), zap.Error(err))
return nil, err
if len(expandGrants) > 0 {
if err := c.proxyClientManager.RefreshPolicyInfoCache(ctx, &proxypb.RefreshPolicyInfoCacheRequest{
OpType: opType,
OpKey: funcutil.PolicyForPrivileges(expandGrants),
}); err != nil {
log.Warn("fail to refresh policy info cache", zap.Any("in", in), zap.Error(err))
return nil, err
}
}
return nil, nil
}))
Expand Down

0 comments on commit 5853f02

Please sign in to comment.