Skip to content

Commit

Permalink
pre-delete changed entity in invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Boudreau committed Jul 24, 2024
1 parent eb7df5f commit 6e7aea6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vault/identity_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,11 @@ func (i *IdentityStore) invalidateEntityBucket(ctx context.Context, key string)
i.logger.Error("failed to remove entity aliases from changed entity", "entity_id", memDBEntity.ID, "error", err)
return
}

if err := i.MemDBDeleteEntityByIDInTxn(txn, memDBEntity.ID); err != nil {
i.logger.Error("failed to delete changed entity", "entity_id", memDBEntity.ID, "error", err)
return
}
}

err = i.upsertEntityInTxn(ctx, txn, bucketEntity, nil, false)
Expand Down

0 comments on commit 6e7aea6

Please sign in to comment.