Open tehmaestro opened 6 years ago
Thanks for posting in our issue tracker. In order to properly assist you, we need additional information:
Thanks!
This is an automated comment, triggered by adding the label status:need more info
.
Please try code from master.
Thanks for your reply. I did try master and I still get the error. How I tested:
1) Checkout master, make some api requests, get some cached data in Redis 2) Checkout yii-update, composer install dev-master, make some api requests, get some cached data in Redis 3) Back to master, composer install 2.0.12, make some api requests -> error
If I flush the redis database, everything goes back to working as expected,
Hi, so how can I tackle this? I've got multiple API machines in a load balanced environment, so my machines will get the update one at a time. Should I just use another DB from Redis cache? Or is this considered a bug? Thank you.
Looks like cache structure was changed and UPGRADE is missing the fact. Adding another instance of Redis and setting new code to use it should be a good solution. Old code will use old cache, new code will use new cache. Make sure that schema cache only is set to use new Redis instance since primary cache should stay shared as it was.
What steps will reproduce the problem?
Hi, I'm trying to upgrade our backend from version 2.0.12 to 2.0.15.
We have 4 backend machines, running Yii2 REST APIs and when I deploy the upgrade, from 2.0.12 to 2.0.15 , the machines are upgraded one by one. Also, I use yii2-redis for caching and MySQL as a database.
When running the deployment, the machines still running 2.0.12 throw a
Trying to get property of a non-object
. I believe this is because the caching structure for the table schemas has changed. In 2.0.15, there is a top-levelschema
key in the JSON that is being cached.Version 2.0.15 is overwriting the cache with the new structure.
What is the expected result?
The backend machines should work normally, no errors.
What do you get instead?
I get a
Trying to get property of a non-object in ActiveRecord:404
Thrown on 2.0.12 instances.
Additional info
Might be related to https://github.com/yiisoft/yii2/issues/15117 . Not sure if that last fix works, I only tried 2.0.15.1
2.0.12
2.0.15