Skip to content

Commit

Permalink
fix: fix metaCache cleanup issue when listPolicy failed (milvus-io#34449
Browse files Browse the repository at this point in the history
)

issue: milvus-io#34667

---------

Signed-off-by: balloon1995 <[email protected]>
Co-authored-by: congqixia <[email protected]>
  • Loading branch information
balloon1995 and congqixia authored Jul 16, 2024
1 parent b5225df commit 7306d2d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/proxy/meta_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,13 @@ func (m *MetaCache) RefreshPolicyInfo(op typeutil.CacheOp) (err error) {
return err
}

if !merr.Ok(resp.GetStatus()) {
log.Error("fail to init meta cache",
zap.String("error_code", resp.GetStatus().GetErrorCode().String()),
zap.String("reason", resp.GetStatus().GetReason()))
return merr.Error(resp.Status)
}

m.mu.Lock()
defer m.mu.Unlock()
m.userToRoles = make(map[string]map[string]struct{})
Expand Down

0 comments on commit 7306d2d

Please sign in to comment.