The database and the Elasticsearch indices can be corrupted if an operation on Quality profile fails. The operation should be resilient to errors and do not persist or index inconsistent data.
- POST api/qualityprofiles/delete
- profile is deleted from database
- remove the related active rules from index --> failure, for instance because the Elasticsearch server is under pressure and can't process the request. At this point of time the documents still exist and won't be deleted anymore.