Hi,
Thanks Jordan.
I had explained incorrectly regarding the use of the constructed parent key.
So in the example of Foo and FooLog, I had meant to say:
Construct a fake parent key for FooLog: parent =
Key("FooLog",foo.key.id())
So a FooLog entity would be created with
parent = Key("FooLog", foo.key.id())
e.g. foolog = FooLog(parent=parent, some_prop="property")
Is it OK to use a parent key that doesn't exist?
Thanks
Rob
On Monday, May 15, 2017 at 10:08:23 PM UTC+2, Jordan (Cloud Platform
Support) wrote:
>
> An Entity Group consists of a root ancestor Entity
> <https://cloud.google.com/appengine/docs/standard/python/datastore/entities#Python_Ancestor_paths>,
>
> and all of its descendants. There is a write throughput of one transaction
> per second per Entity Group, where transactions on a given entity group are
> executed serially, one after another. If too many concurrent modifications
> are attempted on the same entity group, Datastore will return an error.
>
> Your code should properly handle failed transactions with an exponential
> backoff retry strategy
> <https://cloud.google.com/storage/docs/exponential-backoff> in order to
> retry the transaction. You can also initially write to Memcache
> <https://cloud.google.com/appengine/docs/standard/python/memcache/> before
> performing a transaction, as this will make the written results available
> immediately. Your reads would then first attempt a read from Memcache, and
> then fail directly to reading from the Datastore if the results are not
> cached.
>
> - Alternatively as you suggested, you can manually place the parent 'Foo'
> entity ID in a different custom property of 'FooLog' and 'FooAudit',
> forcing both 'FooLog' and 'FooAudit' to both become their own root entity
> (as they will no longer have a parent). This will in turn remove the entity
> group, and remove the write throughput limit. Note, this will of course
> remove the strong-consistency
> <https://cloud.google.com/datastore/docs/concepts/structuring_for_strong_consistency>
>
> benefits of entity groups.
>
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/a5811adf-0ef8-4e67-91c5-3d6b5746da7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.