2012-03-27 37 views
9

我有一個Django應用程序,我試圖通過多種類型的實體組執行事務。當我嘗試在我的本地開發機器上測試此問題時,出現此錯誤:如何在本地開發機器上模擬(Google App Engine)高複製數據存儲?

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

對此的最佳解決方法是什麼?

回答

23

從命令行啓動Google App Engine時使用--high_replication。例如:

python /usr/local/bin/dev_appserver.py --datastore_path=/tmp/datastore app --port=9999 --high_replication 
+6

在通過測試平臺的單元測試中怎麼樣? – dplass 2012-09-05 23:41:42

相關問題