Review 13.4 Merged

88091[BUGFIX] Improve DH logging at row insert

Christian Kuhn CR +2 V +2 Easy +11 −22 updated 02/07/25, 20:31

Commit message

DataHandler->insertDB() log handling is weird: It depends on
$newVersion that is partially derived from record state, and
partially derived from table tcaSchema->isWorkspaceAware().

The intention is to write log messages wether a new live
record has been added, or an new workspace overlay has been
added.

The patch simplifies the logic by looking at the incoming
record and removing the dependency to methods
getRecordPropertiesFromRow() and getRecordProperties().

There is one important side effect of this change: Current
log messages tried to state the 'record title'. This was done
by the internals of getRecordPropertiesFromRow() and
getRecordProperties() which trigger BU::getRecordTitle().
This is in general not a good idea. Log messages should
mainly refer to table:uid only since uids are the only thing
that don't change (in contrast to TCA derived titles).
Next, BackendUtility::getRecordTitle() can trigger a lot
of expensive sub calculations that should not be done within
DataHandler. Last, calculated record title is often empty,
leading to no useful information in logs.

This change reduces the DB load slightly since the record
in question is less often selected.

Further patches will continue improving DataHandler log
messages and there is potential to improve ext:belog with
good filter capabilities.

Note the v13 backport of this change will keep the existing
of the `@internal` instertDB() method, which is kept public
in this branch.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 34

  1. Christian Kuhn uploaded patch set 1 02/07/25, 20:16

  2. core-ci voted on patch set 1 V +1 02/07/25, 20:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73771

  3. Christian Kuhn voted on patch set 1 CR +2 V +2 02/07/25, 20:31

  4. Christian Kuhn merged patch set 2 02/07/25, 20:31