Navigation Menu

Skip to content
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

Merged
merged 1 commit into from Jun 19, 2018

Conversation

nicolas-grekas
Copy link
Member

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 byHttpCache: right now when the master request starts the session, fragments are not cacheable anymore, even when they do not use the session.

@nicolas-grekas
Copy link
Member Author

(failure will be fixed once merged up to master)

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Jun 14, 2018

ping @symfony/deciders votes pending, this "just" fixes ESI with HttpCache, which are broken (found in training sessions by @jpauli )

Copy link
Member

@stof stof left a 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

@nicolas-grekas nicolas-grekas merged commit 146e01c into symfony:3.4 Jun 19, 2018
nicolas-grekas added a commit that referenced this pull request Jun 19, 2018
…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 nicolas-grekas deleted the session-count-usage branch June 20, 2018 13:32
@stefandoorn
Copy link

@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?

@nicolas-grekas
Copy link
Member Author

Only a profile could tell...

@nicolas-grekas
Copy link
Member Author

Maybe try branch 3.4-dev?

@stefandoorn
Copy link

Yeah, was afraid about that :-D Will see if I can get that :) And I'll try the dev branch, good one.

@stefandoorn
Copy link

I can confirm that on 3.4.2 files were being written to the http_cache folder inside the cache folder, but on 3.4.11 it's not happening. Tested locally.

@danrot
Copy link
Contributor

danrot commented Jun 26, 2018

@nicolas-grekas Are you aware that the session is always used in tests now? That's because of this $session->isEmpty statement. And I am relying on that in one of our tests. For now I had no better way to deactivate the session completely, which also doesn't feel very good...

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).

@nicolas-grekas
Copy link
Member Author

@danrot I know about #27714

@nicolas-grekas
Copy link
Member Author

@danrot can you please check #27714 and confirm it fixes the issue for you also?

@danrot
Copy link
Contributor

danrot commented Jun 29, 2018

Just tested it, it works 👍 Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants