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

[FrameworkBundle] prevent cache:clear creating too long paths#16829

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
Tobion merged 1 commit intosymfony:2.3fromTobion:warmup-max-path
Dec 10, 2015

Conversation

@Tobion
Copy link
Contributor

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#15547#16783
LicenseMIT
Doc PR-

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

this was really dumb. it renamed the folder, just to remove it then.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Isn't the purpose of that to provide a clean cache dir faster? Since renaming takes less time than removing.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

do you have some evidence for this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is obviously heavily platform dependent, so its difficult to provide good evidence.
As a comparison on a high / low resource system: (Cache size: 11.2MB, 772 files, 512 directories)

50 iterationsRenameRemove
high~3ms~687ms
low~4ms~3708ms

https://gist.github.com/Tischoi/2dc5c0ef3bfa08328478

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'd the purpose of this line is to have an atomic clearing of the cache. If I'm not wrong, we should keep it (and add a comment about it)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It depends on the filesystem you use. Normally removing a directory only involves removing a reference it to. Also I don't think it matters at the end and I could not find any information that this was done on purpose in git.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ok I'll revert that. From what I read, moving a directory is more likely to be atomic than deleting. Most filesystems implement moving a directory on the same partition atomically.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

reverted

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

this was done twice

@Tobion
Copy link
ContributorAuthor

ping @symfony/deciders this fix is important to merge as the bug is currently causing problems for all windows users running symfony. Together withdoctrine/cache#107 it is gone.

@fabpot
Copy link
Member

👍

@xabbuh
Copy link
Member

👍

Status: Reviewed

@TobionTobion merged commit6e279c5 intosymfony:2.3Dec 10, 2015
Tobion added a commit that referenced this pull requestDec 10, 2015
…ths (Tobion)This PR was merged into the 2.3 branch.Discussion----------[FrameworkBundle] prevent cache:clear creating too long paths| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#15547#16783| License       | MIT| Doc PR        | -Commits-------6e279c5 [FrameworkBundle] prevent cache:clear creating too long paths
@TobionTobion deleted the warmup-max-path branchDecember 10, 2015 00:42
This was referencedDec 26, 2015
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@Tobion@fabpot@xabbuh@nicolas-grekas@Mattabile@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp