Project

General

Profile

Actions

Task #56833

closed

Locking around fwrite is not needed in append mode

Added by Philipp Gampe over 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Performance
Target version:
-
Start date:
2014-03-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
easy
Sprint Focus:

Description

There are several calls in the TYPO3 core that use locking around files opened in append note to write using fwrite.
According to the PHP documentation, fwrite is atomic on local file systems.

If handle was fopen()ed in append mode, fwrite()s are atomic (unless the size of string exceeds the filesystem's block size, on some platforms, and as long as the file is on a local filesystem). That is, there is no need to flock() a resource before calling fwrite(); all of the data will be written without interruption.

Unneeded:
GeneralUtility:syslog()
GeneralUtility:deprecationLog()

it should stay in:
MboxTransport::send()

Actions #1

Updated by Philipp Gampe over 10 years ago

  • Tracker changed from Bug to Task
Actions #2

Updated by Gerrit Code Review over 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28312

Actions #3

Updated by Philipp Gampe over 10 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF