Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I simulate a (Google App Engine) High Replication datastore on a local dev machine?

I have a Django app and I am trying to perform transactions over multiple types of entity groups. When I try to test this on my local dev machine I get this error:

ERROR 2012-03-27 10:11:12,971 datastore.py:2480] Exception sending Rollback: Traceback (most recent call last): File "/usr/local/google_appengine/google/appengine/api/datastore.py", line 2475, in _DoOneTry File "/usr/local/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1984, in rollback File "/usr/local/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1999, in async_rollback File "/usr/local/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1928, in _end_transaction File "/usr/local/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1883, in transaction File "/usr/local/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 592, in get_result File "/usr/local/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1670, in __begin_transaction_hook File "/usr/local/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1184, in check_rpc_success BadRequestError: transactions on multiple entity groups only allowed with the High Replication datastore

What's the best workaround for this?

like image 786
Anand Iyer Avatar asked Mar 27 '12 10:03

Anand Iyer


1 Answers

Use --high_replication when you're launching Google App Engine from the command line. For example:

python /usr/local/bin/dev_appserver.py --datastore_path=/tmp/datastore app --port=9999 --high_replication
like image 101
Anand Iyer Avatar answered Sep 22 '22 00:09

Anand Iyer