0
votes

I'm migrating a GAE app from python 2.5 to 2.7. The migration docs say:

Warning: If your app uses memcache, be aware that datastore entities cached by Python 2.7 apps will raise an error if fetched from an app on the Python 2.5 runtime. It is strongly recommended that you do not simultaneously use both Python runtimes on the same app ID, even as different app versions. If you must use both runtimes, be careful not to store datastore entities in memcache. If you must, and are using NDB, temporarily disable automatic caching by adding _use_memcache=False to your models until your app is completely migrated to 2.7.

If I deploy a version using 2.5, and another version using 2.7, and they both use memcache, and I ensure that the memcache keys used by them are mutually exclusive, do I avoid the issue?

I realize that the safest thing to do is disable memcache in my 2.7 version, until I can retire my 2.5 version, but that will make testing the 2.7 version more difficult, so I'd prefer to have both versions using memcache, if possible.

1

1 Answers

1
votes

I believe if you're absolutely positive that you've isolated the keys used by the two different versions you'll be OK.

To be safe, I'd suggest using traffic splitting to send a small amount of traffic to your Python 2.7 version so that if problems appear they manifest on a small percentage of your traffic. You can gradually increase the percentage, while watching for errors, until all traffic is served from the new version.