appengine
appengine copied to clipboard
datastore: only legacy implementation of AllocateIds() is available
The AllocateIds()
function that is implemented in the google.golang.org/appengine/datastore
package only allows you to allocate a range of ID:s. This method of generating ID:s is considered legacy and causes hot tablet issues since the ID:s are sequentially generated.
AllocateIds()
in google-cloud-go/datastore
takes a slice of incomplete keys and returns a slice of complete keys. Judging from the documentation in the best practices I assume the ID:s for the keys are better distributed.
Currently the only option for generating scattered keys with the appengine/datastore
package is currently to Put()
entities with incomplete keys, but that is not suitable for all situations.
So my request is that an allocateIds() function that allows scattered ID:s is implemented in the appengine/datastore pkg.