Bug #32707
Bad Bad FileBackend
| Status: | Accepted | Start date: | 2011-12-19 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | Karsten Dambekalns | % Done: | 0% |
|
| Category: | Cache | |||
| Target version: | TYPO3 Flow Base Distribution - 2.0.1 | Estimated time: | 2.00 hours | |
| PHP Version: | Complexity: | easy | ||
| Has patch: | No | FLOW3 version affected: | Git 1.0 | |
| Votes: | 1 (View) |
Description
The FileBackend is not working under middle to high load and also not working relyable on shared filesystems
The main reason is the set function:
- All fileoperations need to be atomic - so why is ->remove() called and after this the file is written to some temp file and then renamed.
=> It should work by just removing the ->remove call, the rename method will replace the existing entry.
Also the while (!rename($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename) && $i < 5) seems to be unnecessary - why is this done?
Other improvements might be to get rid of the extra cache meta data for expire time - maybe using filemtime is faster at the end (it avoids expensive file_get_contents two times)
Related issues
| related to TYPO3.Flow - Bug #27989: Wrong check in our atomic writes code | Resolved | 2011-07-08 | ||
| precedes (1 day) Core - Bug #32709: Make FileBackend more stable | New | 2011-12-21 | 2011-12-21 |
History
Updated by Daniel Poetzinger over 1 year ago
the fixme mentioned in typo3 core might be also relevant
// @FIXME: At least the result of rename() should be handled here, report to FLOW3 could be fixed as well
Updated by Karsten Dambekalns over 1 year ago
- Status changed from New to Accepted
- Assignee set to Karsten Dambekalns
- Target version set to 1.1
Updated by Karsten Dambekalns 12 months ago
- Target version changed from 1.1 to 1.1 RC1
Updated by Karsten Dambekalns 11 months ago
- Target version changed from 1.1 RC1 to 2.0 beta 1
- FLOW3 version affected changed from Git master to Git 1.0
Updated by Karsten Dambekalns 5 months ago
- Target version changed from 2.0 beta 1 to 2.0
Updated by Robert Lemke 1 day ago
- Target version changed from 2.0 to 2.0.1