Review main Merged

93278[BUGFIX] Set tstamp in DatabaseWriter for sys_log

Sebastian Michaelsen CR +2 V +2 Easy +22 −0 updated 03/22/26, 16:39

Commit message

Without setting tstamp, the field defaults to 0 (1970-01-01).
TableGarbageCollectionTask uses tstamp to determine record age
and immediately deletes all DatabaseWriter entries on every run.

Set tstamp to (int)$record->getCreated() when writing to sys_log,
consistent with BackendUserAuthentication::writelog(). The field
is sys_log-specific so the assignment is guarded by a table check.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 917

  1. Sebastian Michaelsen uploaded patch set 1 03/19/26, 13:38

  2. Sebastian Michaelsen updated the commit message in patch set 2 03/19/26, 13:43

  3. core-ci voted on patch set 1 V -1 03/19/26, 13:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98234

  4. core-ci voted on patch set 2 V -1 03/19/26, 13:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98235

  5. Sebastian Michaelsen uploaded patch set 3 V -1 03/19/26, 13:59

  6. Sebastian Michaelsen uploaded patch set 4 03/19/26, 14:03

  7. core-ci voted on patch set 3 V -1 03/19/26, 14:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98236

  8. core-ci voted on patch set 4 V -1 03/19/26, 14:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98237

  9. core-ci commented on patch set 4 03/19/26, 14:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98237

  10. core-ci commented on patch set 4 03/19/26, 14:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98237

  11. core-ci commented on patch set 4 03/19/26, 15:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98237

  12. Garvin Hicking commented on patch set 4 03/19/26, 15:09

    DatabaseWriter.php:96

    I could not check this yet - do we need this specific if-clause? Probably if other tables are configured they would have this field too? Otherwise maybe we could utilise the schema api and check for the tstamp column and if it exists? Since this here is a very abstract class I'd like to avlid hardcodinf a specific name (even if this is the one thats hardcoded in the GC task)
  13. core-ci voted on patch set 4 V +1 03/19/26, 15:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98237

  14. Georg Ringer voted on patch set 4 CR +1 V +1 03/19/26, 19:46

  15. Garvin Hicking commented on patch set 4 CR +1 V +1 03/19/26, 20:46

    DatabaseWriter.php:96 Reply

    Thinking some more about this, I guess the pragmatic guarding access here is alright.
  16. Georg Ringer voted on patch set 4 CR +2 V +2 03/22/26, 16:39

  17. Georg Ringer merged patch set 5 03/22/26, 16:39