Skip to content

Force SDK 1.6.4. to save datastore on exit. #25

wants to merge 33 commits into from

3 participants

dragonx commented Apr 8, 2012

There's a couple of reports of various actions other than 'runserver' failing to save the datastore to disk. This change works around that and forces a flush on exit.

dragonx commented Apr 9, 2012

Actually, don't pull this. It works on dev_appserver, but not when deployed.

jacobg commented May 2, 2012

Is this fork tested and ready to pull?

dragonx commented May 2, 2012

It was, on 1.6.4, but I haven't tested on 1.6.5 yet. I think it's actually unnecessary on 1.6.5 since I believe they've fixed this issue in the SDK.

jacobg commented May 2, 2012
dragonx commented May 2, 2012

Then I'm rather disappointed at the boys at Google. I'm pretty sure this fork is safe to pull at this point.

User added some commits May 18, 2012
dragonx commented May 19, 2012

I just tested on 1.6.5 on Linux, on a bad configuration where I'm using the python 2.5 runtime, but actually running python 2.7 locally.

The problem is fixed with the SDK, so this change is now unnecessary - at least with "python shell".
jacobg, since your still seeing problems, can you give a little bit more detail about your test case/config.

User added some commits May 19, 2012
User Add GAETestCase class that allows the developer to specify a consiste…
…ncy_probability in the testcase.

The given consistency_probability will be used to configure the datastore.  Otherwise, it's the same as django.test.TestCase.
User Left in some test code by mistake. 3a172c1
@dragonx dragonx closed this May 20, 2012
dragonx commented May 23, 2012

jacobg, I'd report this to Google, they probably think the issue is fixed. 1.6.4 changed the dev_appserver datastore so that it was saved to disk on exit, and they only handled a few exit cases. They handled more exit cases in 1.6.5, so it seems like my situation is fixed (I run from the command prompt on Linux). I know that my patch didn't work for some users of eclipse in Windows - I haven't followed up on whether that's been fixed.

The Terminate Failed message is a pretty big hint that dev_appserver is not happy with the way Aptana is shutting things down. Feel free to keep using the patch, but I think it's better if Google fixes it in their SDK.

User Revert develop branch to match django-nonrel/djangoappengine/develop …

This means removing all the ancestor keys related changes, but this branch now passes all djangoappengine and djangotoolbox tests.
@dragonx dragonx reopened this May 26, 2012
dragonx commented May 26, 2012

Two comments:

jacobg, I've realized I'm seeing the same issue as you, when running runserver from the command prompt and killing it with Ctrl-C. That used to work even with 1.6.4, but it's broken for me now with 1.6.5. "python shell" works with 1.6.5 though. Can you verify that you're also seeing the issue from the command prompt? Also, what platform are you running on?

Second, I've polluted this pull request with other commits in my branch. I don't know how to modify the pull request to limit it to a few checkins, so I'll probably launch a new pull request once I've figured this out.

@dragonx dragonx closed this May 26, 2012
@dragonx dragonx referenced this pull request May 26, 2012

Reissue pull request #25 #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.