-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation] save session data as binary & add lazy-connect & create table & lifetime per session #10991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@fabpot This is ready. I added upgrade and changelog notes. |
The PDO session handler is so much different than before and we are so close of 2.5 final that I'm more an more uncomfortable with those changes done now. Basically, I see two options:
@Tobion I tend to prefer the second option, but if a great blog post written today might work as well. It's really up to you. |
On a side note, we did rush some big last minute changes in the past and it was rarely a good idea. |
I'm ok with waiting for 2.6 |
@Tobion Ok, let's revert the changes. To be sure I don't forget anything, can you list here the PRs that should be reverted (IIRC, I think there was more than one)? |
You only need to revert the same thing in 2.5 that you already reverted in 2.3 and 2.4: #10908 |
#10908 has been reverted. |
Encoding session data was definitely the wrong solution. Session data is binary text (esp. when using other session.serialize_handler) that must stay as-is and thus must also be safed in a binary column. Base64 encoding session data just decreses performance and increases storage costs and is semantically wrong because it does not have a character encoding.
That saving null bytes in Posgres won't work on a character column is also documented
Implement lazy connections that are only opened when session is used by either passing a dsn string explicitly or falling back to session.save_path ini setting.
add a create table method that creates the correct table depending on database vendor. This makes the class self-documenting and standalone useable.
add lifetime column to session table which allows to have different lifetimes for each session
added upgrade and changelog notes