Clone created entities that were inserted into memdb... (#16487)
* Clone created entities that were inserted into memdb to prevent possibility of data race.
This commit is contained in:
parent
b9181077fd
commit
488858e919
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
identity: Prevent possibility of data races on entity creation.
|
||||
```
|
|
@ -1094,7 +1094,7 @@ func (i *IdentityStore) CreateEntity(ctx context.Context) (*identity.Entity, err
|
|||
nsLabel,
|
||||
})
|
||||
|
||||
return entity, nil
|
||||
return entity.Clone()
|
||||
}
|
||||
|
||||
// CreateOrFetchEntity creates a new entity. This is used by core to
|
||||
|
|
Loading…
Reference in New Issue