3
votes

App Engine recently announced support for Cross Group (XG) transactions; one would expect these transactions to incur additional overhead when used across multiple entity groups, but if I specify I want an XG transaction at the start of a transaction, but then in fact only access one entity group, will I see a significant performance impact?

I ask because JDO requires that the XG-ness be specified at the persistence manager level, and it would be much simpler to just turn it on for all transactions (I only need it for a few, rare cases)...

2

2 Answers

3
votes

From the official docs:

An XG transaction that touches only a single entity group behaves like a single-group transaction. Operations within such a transaction have the same performance and cost as in an equivalent single-group transaction with regard to billing and resource usage, but will experience higher latency.

source: https://developers.google.com/appengine/docs/python/datastore/overview

1
votes

It's not documented or defined if this is the case, but it's safest to assume that the overhead will exist for all transactions.

If you're concerned about overhead, you probably shouldn't be using JDO, since creating a PersistenceManager has a lot of overhead in and of itself.