GAE SDK 1.6.4 dev_appserver datastore flush

后端 未结 3 1514
闹比i
闹比i 2020-12-12 03:24

Hoping to get a comment from the GAE python team on this one.

Has something changed between 1.6.3, 1.6.4 with regards to the way the dev_appserver datastore is flush

3条回答
  •  一生所求
    2020-12-12 04:22

    Before 1.6.4, we saved the datastore after every write. This method does not work when simulating the transactional model found in the High Replication Datastore (you would lose the last couple writes). It is also horribly inefficient. We changed it so the datastore dev stub flushs all writes and saves it's state on shut down.

    Following the code:

    1. https://bitbucket.org/wkornewald/djangoappengine/src/60c2b3339a9f/management/commands/runserver.py#cl-154
    2. http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/dev_appserver_main.py#683

    It looks like manage.py should work if the server is shut down cleanly (with a TERM signal or KeyInterrupt).

提交回复
热议问题