Unified Storage: Fix Entity Server unconditionally starting (#88857)

fix Entity Server unconditionally starting
This commit is contained in:
Diego Augusto Molina
2024-06-06 12:17:46 -03:00
committed by GitHub
parent be96971289
commit ae84c5fef9
5 changed files with 43 additions and 9 deletions
@@ -17,6 +17,10 @@ func (s *sqlEntityServer) Update(ctx context.Context, r *entity.UpdateEntityRequ
ctx, span := s.tracer.Start(ctx, "storage_server.Update")
defer span.End()
if err := s.Init(); err != nil {
return nil, err
}
key, err := entity.ParseKey(r.Entity.Key)
if err != nil {
return nil, fmt.Errorf("update entity: parse entity key: %w", err)