[TYPO3-dev] malformed cached config files

Roland Hager roland.hager at tu-berlin.de
Wed Nov 2 17:01:32 CET 2011


Hi Christian,

On 02.11.2011 15:06, Christian Kuhn wrote:
> Hey,
>
> On 11/02/2011 10:21 AM, Roland Hager wrote:
>> Does TYPO3 support something like that? A DB based locking mechanism?
>
> t3lib_lock does not support db locking currently, but I know of at least
> one company who have a patch for this in production. I'll trigger them
> if they want to push it as feature.

That would be great, thanks!

In the meantime I figured out that a normal flock() seems to work as 
expected in our environment. So I placed a readlock before checking the 
existence of the cached config files and a writelock before writing 
them. Regarding the logfiles (yes this time with a >g<) now reading and 
writing the cached config files is serialized just fine.

@Christian:  I'm still interested in the DB-locking mechanism though !!!

By the way, the t3lib_lock CLASS is missing a read lock. It always 
acquires an exclusive lock which is not desirable here. As I see, not 
every locking method supports read locks but how about adding a boolean 
parameter "readlock" to the function t3lib_lock::acquire()? It could 
default to FALSE and every locking method decides how to handle it?


best regards
Roland



More information about the TYPO3-dev mailing list