Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpFoundation] Precalculate expiry timestamp#14625
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
dosten commentedMay 13, 2015
| Q | A |
|---|---|
| Bug fix? | no |
| New feature? | no |
| BC breaks? | yes |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #13955 |
| License | MIT |
| Doc PR | - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This would need to be added to the update file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I've added more info in theUPGRADE-3.0.md file, see above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
you can just put0 here since this is only dummy data that will be updated by the write operation later anyway
dosten commentedMay 14, 2015
@Tobion done |
UPGRADE-3.0.md Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This will result in wrong expiry time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes, maybe the steps must be:
- Create a new
sess_expirycolumn. - Migrate the old data:
UPDATE session SET sess_expiry = sess_time + sess_lifetime; - Remove the
sess_timeandsess_lifetimecolumns.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
ping@Tobion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
yes
dosten commentedMay 23, 2015
@Tobion updated the UPGRADE-3.0.md file. |
Tobion commentedMay 23, 2015
👍 |
Tobion commentedMay 29, 2015
ping @symfony/deciders |
xabbuh commentedMay 30, 2015
Can we in a way provide a smoother upgrade path (ie. by offering a deprecation message in Symfony 2.8)? |
weaverryan commentedMay 30, 2015
I agree. I think we should create a new class for this and deprecate the old class. We already messed this up in 2.6 with the new |
Tobion commentedMay 30, 2015
I agree is would be nicer. But how would we name the new PdoSessionHandler? If the name sucks, we have to change the name again in 3.0 which will not make the upgrade easier. |
weaverryan commentedMay 30, 2015
@Tobion ha, so true - we don't want something like And I'm really not sure - I think about this question a lot, but I don't know a good, global answer. How about |
GromNaN commentedMay 31, 2015
Is there a necessity of removing the Since this For a smoother migration path, I would create a feature flag to enable the extra |
dosten commentedJun 17, 2015
IMO the only factible way to introduce this in 2.8 is the idea proposed by@GromNaN. What do you think? If all agree, i can make the necessary changes. |
weaverryan commentedJun 19, 2015
I think@GromNaN's idea would certainly work, though we'd need to have a lot of if statements inside the class to use different queries. But we could deprecate theold way and remove it in 3.0 (meaning only 1 version would need to have all these ugly if statements). But yea, I would like to fix this - other than the BC part, it sounds like a great win! |
dosten commentedJun 19, 2015
Ok, i will work on this. |
weaverryan commentedJun 19, 2015
@dosten you rock :) |
Tobion commentedJun 19, 2015
I think the index on the expiry column is really necessary for high loads:#15020 (comment) |
dosten commentedJun 19, 2015
I'm not a database expert, if someone knows how to create an index in mysql, sqlite, pgsql, oci or sqlsrv.. help is welcome :) |
GromNaN commentedJun 19, 2015
@dosten the syntax is SQL standard :https://dev.mysql.com/doc/refman/5.0/en/create-index.html CREATEINDEXidx_sess_expiryON session (sess_expiry); |
dosten commentedJun 28, 2015
Closing this because i'm going to create another PR over the 2.8 branch. |
GuilhemN commentedFeb 1, 2016
no news about this? |
Removed timestamp and lifetime columns in favor of expiry column.Based on the work done insymfony#14625.Fixsymfony#13955.
Removed timestamp and lifetime columns in favor of expiry column.Based on the work done insymfony#14625.Fixsymfony#13955.Implemented CR suggestions from nicolas-grekas
… (azjezz)This PR was merged into the 4.4 branch.Discussion----------[HttpFoundation] Precalculate session expiry timestamp| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets |#13955,#21423,#14625| License | MITContinued work from the original PR#21423 /#21857Commits-------066000a [HttpFoundation] Precalculate session expiry timestamp