I perform batch delete operation on entity keys using DatastoreService.delete(Key… keys).
Each entity is a root entity, so operation is executed without transaction.
The batch size is hardcoded and the deletion is performed step by step. Each following operation firstly execute key-only get query to fetch entity keys using cursor received from previously executed get query and then performs batch delete query. Scheme seems to work fine,
but what if an exception occurs while delete query?
Is there any way to get a number of successfully deleted entites, or a cursor of the first
not deleted entity? And could you please clarify how this operation is performed in GAE on low-level.
If an exception occurs, some undefined subset of entities have been deleted. There is not currently any way to get a list of which ones were deleted.
Your best option is to simply retry the whole batch delete operation again.