function cleanUp() {
				_Helper.removeByPath(that.mChangeRequests, sEntityPath, oRequestPromise);

				if (aMessages.length) {
					oModelInterface.updateMessages(undefined, aMessages);
				}

				delete oEntity["@$ui5.context.isDeleted"];
				if (Array.isArray(vCacheData)) {
					iIndex = oDeleted.index;
					const iDeletedIndex = vCacheData.$deleted.indexOf(oDeleted);
					if (iIndex !== undefined) {
						that.restoreElement(iIndex, oEntity, iDeletedIndex, vCacheData,
							sParentPath);
					}
					vCacheData.$deleted.splice(iDeletedIndex, 1);
				}
				if (that.iActiveUsages) {
					fnCallback(iIndex, 1);
				} else if (iIndex === undefined && that.reset) {
					// an active cache must let the list binding reset to be told about kept-alive
					// elements, an inactive cache however has no binding and no kept-alive
					// elements
					that.reset([]);
				}
			}
Deletes an entity on the server and in the cached data.

@param {sap.ui.model.odata.v4.lib._GroupLock} [oGroupLock]
  A lock for the group ID to be used for the DELETE request; w/o a lock, no DELETE is sent.
  For a transient entity, the lock is ignored (use NULL)!
@param {string} sEditUrl
  The entity's edit URL to be used for the DELETE request; w/o a lock, this is mostly
  ignored.
@param {string} sPath
  The entity's path within the cache; if the entity is in a collection, the last segment is
  its index therein
@param {object} [oETagEntity]
  An entity with the ETag of the binding for which the deletion was requested. This is
  provided if the deletion is delegated from a context binding with empty path to a list
  binding. W/o a lock, this is ignored.
@param {function} fnCallback
 A function which is called immediately when an entity has been deleted from the cache, or
  when it was re-inserted; the index of the entity and an offset (-1 for deletion, 1 for
  re-insertion) are passed as parameter
@returns {sap.ui.base.SyncPromise}
  A promise which is resolved without a result in case of success, or rejected with an
  instance of <code>Error</code> in case of failure
@throws {Error} If the cache is shared

@public