On Sat, Feb 7, 2009 at 16:25, djidjadji <djidja...@gmail.com> wrote:
>
> Every GeneralCounterShard is an entity group.
> A transaction can only operate on ONE entity group.
> Your transaction code accesses every GeneralCounterShard for a given name.
> With sharded counters you NEVER have a perfect value for the total count.
> The value for get_count() <= Sum(shards)
> You use shards because you have object-lock possibilities.
>
> Maybe this will work (using the function names from the article [1])
> Be aware that at maintenance moments memcache is not working.
>
> def get_count_and_increment(name):
>    count = get_count(name)
>    increment(name)
>    return count+1
>
> [1] http://code.google.com/appengine/articles/sharding_counters.html

The code in my original email worked in dev_appserver, which I suppose
is incorrect.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to