Yeah, the dev server appears to cheat and only has a single id allocator for 
all types.

Also, it is fine to call allocate_ids for a kind that doesn't exist, 
otherwise you couldn't allocate an id for the first model you were going to 
store..

Below is a test I just ran over the remote_api.  The ids do occasionally 
increase sequentially, but as you can see they're all over the shop.  Each 
id is guaranteed to be unique and not currently in use by the selected 
model, but it isn't going to start at 1 and increase reliably.

As for resetting, I doubt it.  BigTable has a long memory and long integers 
to store numbers in.

while True:
...   keys = db.allocate_ids(db.Key.from_path('_DchdHdP-G7', 1), 1)
...   print(keys[0])
... 
17003
107002
54004
17004
16004
17005
54005
107003
20004
16005
59004
59005
16006
57005
16007
107004
17006
54006
107005
29006
107006
29007
54007
57006
16008
17007
20005

-- 
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