Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cm_RedisSession default to true #379

Closed
mpingu opened this issue Nov 17, 2017 · 7 comments
Closed

Cm_RedisSession default to true #379

mpingu opened this issue Nov 17, 2017 · 7 comments

Comments

@mpingu
Copy link

mpingu commented Nov 17, 2017

Affected file: /app/etc/modules/Cm_RedisSession.xml

Could we set the Default value for the module to be true?

When you just update the core with unzipping the tar.gz you overwrite this file and deactivate your Redis integration and Magento will write the sessions into the MySQL Database.

@seansan
Copy link
Contributor

seansan commented Nov 17, 2017 via email

@seansan
Copy link
Contributor

seansan commented Nov 17, 2017

#380

@tomekjordan
Copy link

what if store is not using redis for sessions?

@infabo
Copy link

infabo commented Nov 17, 2017

It does not harm enabling Cm_RedisSession by default. But IMHO any module not being used, should be disabled. In my experience, only "bigger" shops/setups use Redis for session storage (I can see no reason for Redis on a simple single instance shop with SSD file-storage for example).
Anyone in need for Redis (e.g. on scaling setups) should already have a proper deployment configuration up-and-running, so it is easy to consider "enabling modules" like Cm_RedisSession automagically. Just my 2cents.

@tomekjordan
Copy link

true. I use Redis only for FPC

@colinmollenhour
Copy link
Member

There are a couple things going on here:

  1. If your method of updating Magento is to untar files into your production directory you're doing it wrong.. If you insist on doing it this way then definitely do not modify any files that are included in the tar file. Perhaps set the read-only flag on all core files to prevent it explicitly. Then, to enable/disable modules add your own app/etc/modules/Z-local.xml (Z to sort after all other modules) which will override the existing files without you modifying them.

  2. The Magento core code does not allow for easily adding new backends so while it should not even be necessary for Cm_RedisSession to be a proper module (versus just an auto-loaded class), it is required in order to work without modifying core code. However as we actually can modify core code perhaps the best solution would be to allow for other backends so that Cm_RedisSession and the 'db' backend can coexist peacefully. Specifically, here:

https://github.com/OpenMage/magento-lts/blob/1.9.3.x/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php#L59

  1. Enabling Cm_RedisSession causes a rewrite so I wouldn't say there is 0 impact:
    https://github.com/OpenMage/magento-lts/blob/1.9.3.x/app/code/community/Cm/RedisSession/etc/config.xml#L42
    This is related to (2) above so if that was fixed this rewrite could be removed and then it would be a non-issue.

If I remember correctly the newer version that uses the abstracted handler that is shared with M2 actually removes this fallback functionality. I don't think it is the best situation since with the fallback people can think they're using one and in fact be using another. Enabling it by default and then removing the fallback could be disastrous to those using the MySQL handler.

@mpingu
Copy link
Author

mpingu commented Nov 21, 2017

Thanks for the clarification on this point.Imho we can close this then and reference to it if someone askes for the consequences of it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants