[TYPO3-dev] locking of records

Martin Schoenbeck ms.usenet.nospam at schoenbeck.de
Sun Jan 29 22:58:26 CET 2006


Hi Bernhard,

Bernhard Kraft schrieb:

> so the problem you noted: same record updated in the same second
> will only occur if this is be done by the same user ...

The problem is not, updating the same record within one second by two (real
or not) users. The problem only arises, if anybody writes a record and
within the same second two users read and one of them writes the record.
Then the overwriting by the second of them couldn't be detected. It doesn't
matter, with which user id it is done. 

But the situation can be avoided easily by the optimistic locking code. It
simply has to detect the situation where it would write the same timestamp
again and then either defer the write operation for a second or increment
the timestamp by one second, whatever is easier to implement. And because
it's even with scripts not probable, that such a situation occurs at all,
both solutions won't be problematic. 

Only if scripts do more than one write operation on the same record within
a second on a regular basis, the problem will appear in reality. And even
then only, if in parallel somebody edits that data.

Martin
-- 
Bitte nicht an der E-Mail-Adresse fummeln, die paßt so.




More information about the TYPO3-dev mailing list