google-app-engine


How do I ensure unique ids in a Datastore project that comes from a backup?


If I backup and restore with the Google Datastore backup utility, numerical IDs are copied to the new Datastore.
The restoration "manually" assigns numerical IDs -- i.e., it is not using the auto-allocation.
Then, if I create new Entities using the default ID auto-allocation, it seems that I risk collisions. As stated here:
[A]dvanced applications may sometimes wish to assign their own numeric
IDs manually to the entities they create. Be aware, however, that
there is nothing to prevent Datastore from assigning one of your
manual numeric IDs to another entity.
How do I avoid such collisions? I'd rather not switch to using names, to maintain compatibility with my existing id-based code.
If you restore into the same project, it is just reassigning the existing IDs, not manually assigning 'new' Ids. This this case, you will not run into any issues with auto-allocation. As a related note, we track auto-assigned Ids per entity-group, so you cannot copy child entities from one group to another.
This works across projects due to internal APIs we can call.

Related Links

How to increase GAE datastore index quota?
ndb independent transactions and retry
NDB querying a GenericProperty in repeated Expando StructuredProperty
objectify filter empty values
GAE error (<stderr>: SystemId Failed
Backend instance at custom domain
Manually add entity to empty Google App Engine DataStore
Google App Engine Log - ms and cpu_ms [duplicate]
unable to deploy after upgrading to 1.7.4
Model.get(list_of_keys) in a transaction, filtering a single entity group instead of throwing BadRequestError
Google app engine and JPA with Eclipse plug-in
Many-To-Many Relationships in Google App Engine Datastore (ndb)
Is it possible to run Google Omaha on Google App Engine?
Loading request start-up time variation in google app engine?
GAE 1.7.3 - How to debug appengine-web.xml XML error validating
How to setup data fixtures in Google App Engine for Go

Categories

HOME
telegram
css3
phpmyadmin
composite-primary-key
apiblueprint
edge
big-o
square
x264
odoo-8
computer-science
mql5
little-proxy
startup
activecollab
x-cart
php-5.6
dynatrace
symmetricds
coin3d
nim
topology
ag
epsilon
google-api-client
onload
android-maps
bringtofront
cppreference
code-snippets
google-knowledge-graph
dm-script
health-monitoring
spring-mvc-test
naming
chronicle-map
chai-as-promised
bluez
payara-micro
carrot2
java-bytecode-asm
edit
janus
flac
google-photos
reachability
ziparchive
dotnetnuke-7
mongodb-php
scaffolding
firebase-security
lean
shopping
beanstalk
grass
httpruntime.cache
directdraw
terracotta
intel-c++
text-search
dock
node-serialport
entity-framework-4.3
xmltype
phpldapadmin
nodelist
filesplitting
universal-image-loader
xml-dsig
tinyxml
terminate
qscrollarea
accesscontrolexception
observium
pclzip
mysql-error-2013
swfobject
redis-py
database-create
kqueue
flex-mobile
expression-blend-4
u2netdk
umra
w3c-geolocation
inline-formset
instantiationexception
dot-emacs
interprocess
isapi-extension
application-verifier
lalr
purepdf
fail-fast-fail-early
sqlobject
entitykey

Resources

Encrypt Message