Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpKernel] lock when writting profiles#47435

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

Merged
fabpot merged 1 commit intosymfony:4.4fromnicolas-grekas:hk-lock-profile
Aug 31, 2022

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#47280
LicenseMIT
Doc PR-

@DennisBirkholz
Copy link

I don't understand why there needs to be a 30+ lines change when a three line change is sufficient. Avoiding a lock if possible is always preferable over an unnecessary lock. The dump file is only ever written once and renaming a file on the same file system is atomic on all relevant file systems. This change touches two code points, which need to be kept in sync and the additional code increases the cognitive load when reasoning about this code in the future and will increase the barrier for new people to understand and contribute.

@nicolas-grekas
Copy link
MemberAuthor

The reason is developer experience: with the atomic write approach, the race condition will lead to a "no-profile" state in the toolbar. With the lock, the profile will pause until the write is done and then load seamlessly.

The fact that the change is bigger is because I factorized some lines of code.

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commit5dfb353 intosymfony:4.4Aug 31, 2022
@nicolas-grekasnicolas-grekas deleted the hk-lock-profile branchAugust 31, 2022 08:20
This was referencedSep 30, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@stofstofstof approved these changes

+1 more reviewer

@artyuumartyuumartyuum approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

6 participants

@nicolas-grekas@DennisBirkholz@fabpot@stof@artyuum@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp