Zanzana: Lazy load cached store info (#96452)
* Lazy load cached store infos
This commit is contained in:
@@ -13,13 +13,10 @@ func (s *Server) Write(ctx context.Context, req *authzextv1.WriteRequest) (*auth
|
||||
ctx, span := tracer.Start(ctx, "authzServer.Write")
|
||||
defer span.End()
|
||||
|
||||
storeInf, err := s.getNamespaceStore(ctx, req.Namespace)
|
||||
storeInf, err := s.getStoreInfo(ctx, req.Namespace)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if storeInf.AuthorizationModelId == "" {
|
||||
return nil, errAuthorizationModelNotInitialized
|
||||
}
|
||||
|
||||
writeTuples := make([]*openfgav1.TupleKey, 0)
|
||||
for _, t := range req.GetWrites().GetTupleKeys() {
|
||||
|
||||
Reference in New Issue
Block a user