-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] fix session tracking in surrogate master requests #27467
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
[HttpKernel] fix session tracking in surrogate master requests #27467
Conversation
a15c14e
to
7b18ee6
Compare
7b18ee6
to
146e01c
Compare
(failure will be fixed once merged up to master) |
ping @symfony/deciders votes pending, this "just" fixes ESI with HttpCache, which are broken (found in training sessions by @jpauli ) |
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.
Looks good to me
…ests (nicolas-grekas) This PR was merged into the 3.4 branch. Discussion ---------- [HttpKernel] fix session tracking in surrogate master requests | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Spotted while looking at ESI fragments resolved by`HttpCache`: right now when the master request starts the session, fragments are not cacheable anymore, even when they do not use the session. Commits ------- 146e01c [HttpKernel] fix session tracking in surrogate master requests
@nicolas-grekas Maybe unrelated, maybe not, I just upgraded from 3.4.2 to 3.4.11 on a site that heavily uses ESI fragments, and performance degraded within a second. Had to revert the upgrade (didn't expect this - locally no issue) to make performance be 'normal' again. Unfortunately no benchmarks or proper debug information available - locally also Blackfire doesnt show me any real differences. Might be related to this? |
Only a profile could tell... |
Maybe try branch 3.4-dev? |
Yeah, was afraid about that :-D Will see if I can get that :) And I'll try the dev branch, good one. |
I can confirm that on 3.4.2 files were being written to the |
@nicolas-grekas Are you aware that the session is always used in tests now? That's because of this Isn't that something that should be fixed in Symfony? I don't really see a nice way of handling this in our codebase (there are a few ways, but I would consider all of them dirty). |
Just tested it, it works 👍 Thanks a lot! |
Spotted while looking at ESI fragments resolved by
HttpCache
: right now when the master request starts the session, fragments are not cacheable anymore, even when they do not use the session.