On Mon, Oct 7, 2013 at 3:49 AM, Francois Masurel <f.masu...@gmail.com>
 wrote:

> To purge some user related contents, I am using a task which does a simple
> *keys only query* and then doing a *delete batch of the keys*. I am using
> a cursor if needed.
> The query is only defined by a *"kind"* filter and an *equality filter* on
> a *user ID* string field, *no sort order defined* (might be the reason of
> the problem described below).
>
> I am testing *iterator.hasNext* to see if there is still some contents to
> delete.  If it is the case I restart the same task with the current *cursor
> ID* as a parameter.
> I noticed pretty quickly that* iterator.hasNext* returns *false *even if
> some *data is remaining* and still need to be deleted.
>
>

Sometimes keys-only queries return stale data. Does the same issue occur if
you use a projection query or a standard query?

As an alternative, you can also schedule the batch-deleting-task to run
more frequently and/or to return a bigger batch of entities with each query.


-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to