Bug #27989

Wrong check in our atomic writes code

Added by Karsten Dambekalns about 10 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Must have
Category:
Cache
Start date:
2011-07-08
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

This is from Cache\Backend\FileBackend, similar stuff is patched into Doctrine's ProxyFactory:

if ($result === FALSE) throw new \TYPO3\FLOW3\Cache\Exception('The temporary cache file "' . $temporaryCacheEntryPathAndFilename . '" could not be written.', 1204026251);
$i = 0;
$cacheEntryPathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
while (!rename($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename) && $i < 5) {
    $i++;
}
if ($result === FALSE) throw new \TYPO3\FLOW3\Cache\Exception('The cache file "' . $cacheEntryPathAndFilename . '" could not be written.', 1222361632);

The second check for $result is moot, because it's not set in the rename loop...


Related issues

Related to TYPO3.Flow - Bug #28733: Implement LockManager for avoiding Race ConditionsResolved2011-08-04

Actions
Related to TYPO3.Flow - Task #3755: Concurrency stress testing and cache mechanismNew2009-06-25

Actions
Related to TYPO3.Flow - Bug #32707: Bad Bad FileBackendAcceptedKarsten Dambekalns2011-12-19

Actions
Related to TYPO3.Flow - Bug #33621: Filebackend reports error when trying to rename file due to concurrent proccessesResolvedBastian Waidelich2012-02-02

Actions
#1

Updated by Karsten Dambekalns almost 10 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
#2

Updated by Karsten Dambekalns almost 10 years ago

  • Target version deleted (1230)
#4

Updated by Karsten Dambekalns over 9 years ago

  • Target version set to 1.1
  • Has patch set to No
#5

Updated by Karsten Dambekalns over 9 years ago

  • Target version changed from 1.1 to 1.0.3
#6

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8786

#7

Updated by Gerrit Code Review over 9 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8787

#8

Updated by Karsten Dambekalns over 9 years ago

  • Status changed from Under Review to Accepted
#9

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8931

#10

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8931

#11

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8787

#12

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/8931

#13

Updated by Karsten Dambekalns over 9 years ago

  • Target version changed from 1.0.3 to 1.0.4
#14

Updated by Karsten Dambekalns over 9 years ago

  • Target version changed from 1.0.4 to 1.0.5
#15

Updated by Karsten Dambekalns about 9 years ago

  • Target version changed from 1.0.5 to 1.1 RC1
#16

Updated by Gerrit Code Review about 9 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12187

#17

Updated by Gerrit Code Review about 9 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12187

#18

Updated by Gerrit Code Review about 9 years ago

Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/12398

#19

Updated by Karsten Dambekalns about 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF