8000 [Config] Race condition and filemtime · Issue #13377 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Config] Race condition and filemtime #13377

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

Closed
lisachenko opened this issue Jan 12, 2015 · 1 comment
Closed

[Config] Race condition and filemtime #13377

lisachenko opened this issue Jan 12, 2015 · 1 comment
Labels
Config Good first issue Ideal for your first contribution! (some Symfony experience may be required)

Comments

@lisachenko
Copy link

Hello, Symfony team!

I want to discuss the behaviour of Config component with checking of file modification time. Currently cache is considered as fresh only when the filemtime of cache is greater than the filemtime of resource.

However, I noticed that for small applications on nice hardware resource creation time and cache creation time can be within one second, so Config component will think that the cache is stale, but this is wrong.

I want to propose to add an additional strictFilemtimeCheck flag for the constructors of resources which will be true by default. When this flag is false, then the check will be not strict and will include an equal sign. Then, developers will be able to decide what to do when filemtime is equal: consider this as stale/fresh cache.

@fabpot fabpot added the Config label Feb 5, 2015
@fabpot
Copy link
Member
fabpot commented Feb 10, 2015

Changing greater by greater of equal sound like the easiest thing to do without any bad impacts.

@fabpot fabpot added the Good first issue Ideal for your first contribution! (some Symfony experience may be required) label Feb 10, 2015
bijibox added a commit to bijibox/symfony that referenced this issue Feb 19, 2015
bijibox added a commit to bijibox/symfony that referenced this issue Feb 19, 2015
fabpot added a commit that referenced this issue Feb 25, 2015
…for isFresh in FileResource (bijibox)

This PR was merged into the 2.3 branch.

Discussion
----------

minor #13377 [Console] Change greater by greater or equal for isFresh in FileResource

| Q             | A
| ------------- | ---
| Fixed tickets | #13377
| License       | MIT

FileResource and tests update

Commits
-------

87800ae minor #13377 [Console] Change greater by greater or equal for isFresh in FileResource
@fabpot fabpot closed this as completed Feb 25, 2015
nicolas-grekas added a commit that referenced this issue Feb 25, 2015
* 2.3:
  [Form] NativeRequestHandler file handling fix
  [HttpKernel] Throw double-bounce exceptions
  minor #13377 [Console] Change greater by greater or equal for isFresh in FileResource
  [2.3] [HttpFoundation] fixed param order for Nginx's x-accel-redirect
nicolas-grekas added a commit that referenced this issue Feb 25, 2015
* 2.6:
  [Form] NativeRequestHandler file handling fix
  [VarDumper] Workaround stringy numeric keys
  [HttpKernel] Throw double-bounce exceptions
  minor #13377 [Console] Change greater by greater or equal for isFresh in FileResource
  [2.3] [HttpFoundation] fixed param order for Nginx's x-accel-redirect
nicolas-grekas added a commit that referenced this issue Feb 25, 2015
* 2.7:
  [Form] NativeRequestHandler file handling fix
  [VarDumper] Workaround stringy numeric keys
  [HttpKernel] Throw double-bounce exceptions
  [FrameworkBundle] silence E_USER_DEPRECATED in insulated clients
  [minor] composer.json fix
  [minor] composer.json fix
  Fixed absolute_url for absolute paths
  minor #13377 [Console] Change greater by greater or equal for isFresh in FileResource
  [2.3] [HttpFoundation] fixed param order for Nginx's x-accel-redirect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Config Good first issue Ideal for your first contribution! (some Symfony experience may be required)
Projects
None yet
Development

No branches or pull requests

2 participants
0