diff --git a/VERSION b/VERSION index 960afd2b..ca8041e6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.2.1 (2012-10-31 11:43:03) stable +Version 2.2.1 (2012-11-01 21:01:40) stable diff --git a/gluon/dal.py b/gluon/dal.py index 1082aa1f..a8dae8d6 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -4608,11 +4608,14 @@ class GoogleDatastoreAdapter(NoSQLAdapter): (items, tablename, fields) = self.select_raw(query) # items can be one item or a query if not isinstance(items,list): - counter = items.count(limit=None) - leftitems = items.fetch(1000) + #use a keys_only query to ensure that this runs as a datastore + # small operations + leftitems = items.fetch(1000, keys_only=True) + counter = 0 while len(leftitems): + counter += len(leftitems) gae.delete(leftitems) - leftitems = items.fetch(1000) + leftitems = items.fetch(1000, keys_only=True) else: counter = len(items) gae.delete(items)