Review main Merged

85295[BUGFIX] Increase size of scope field in sys_http_report

Marc Willmann CR +2 V +2 Easy +1 −1 updated 09/13/24, 21:08

Commit message

In frontend context the field scope in table sys_http_report may
filled with a concatenation of "frontend." and the site configuration
identifier. When the site identifier is too long, new entries in
sys_http_report fail for frontend requests.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
    • Oliver Hader +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
    • Oliver Hader +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 2637

Show 812 earlier messages
  1. Marc Willmann uploaded patch set 1 07/19/24, 08:43

  2. Marc Willmann updated the commit message in patch set 2 07/19/24, 08:50

  3. core-ci voted on patch set 1 V -1 07/19/24, 08:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61793

  4. core-ci voted on patch set 2 V +1 07/19/24, 08:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61795

  5. core-ci voted on patch set 2 V -1 07/19/24, 09:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61796

  6. Oliver Hader wrote 07/19/24, 09:35

    Topic set to csp
  7. core-ci voted on patch set 2 V +1 07/19/24, 12:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61796

  8. Christian Kuhn voted on patch set 2 CR +1 V +1 07/19/24, 19:59

  9. Stefan Bürk commented on patch set 2 07/20/24, 08:03

    Unsure - the field is part of a combined index. This can lead to issues in some cases regarding index key prefix lengths. See MySQL Documentation ``` The index key prefix length limit is 3072 bytes for InnoDB tables that use DYNAMIC or COMPRESSED row format. The index key prefix length limit is 767 bytes for InnoDB tables that use the REDUNDANT or COMPACT row format. For example, you might hit this limit with a column prefix index of more than 191 characters on a TEXT or VARCHAR column, assuming a utf8mb4 character set and the maximum of 4 bytes for each character. Attempting to use an index key prefix length that exceeds the limit returns an error. If you reduce the InnoDB page size to 8KB or 4KB by specifying the innodb_page_size option when creating the MySQL instance, the maximum length of the index key is lowered proportionally, based on the limit of 3072 bytes for a 16KB page size. That is, the maximum index key length is 1536 bytes when the page size is 8KB, and 768 bytes when the page size is 4KB. The limits that apply to index key prefixes also apply to full-column index keys. ``` There may me servers out there having lower InnoDB page sizes from old times or even eventual other default row formats. Granted - with "default MySQL" server installations and so on this should be safe, but can we rely on that ?
  10. Oliver Hader commented on patch set 2 CR +1 08/20/24, 20:18

    Reply

    What do you think about using e.g. `190` (staying under the 767 bytes limit of `mb4`)? In general this change is useful and it's still much larger than the current tiny 32 bytes...
  11. Oliver Hader commented on patch set 3 CR +1 V +1 08/20/24, 20:19

    Published edit on patch set 2.
  12. Oliver Hader voted on patch set 3 CR +1 V +1 08/20/24, 20:22

  1. core-ci voted on patch set 3 V -1 08/20/24, 20:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63854

  2. core-ci commented on patch set 3 08/20/24, 21:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63854

  3. core-ci commented on patch set 3 08/21/24, 10:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63854

  4. Oliver Hader rebased onto patch set 4 CR +1 V +1 08/21/24, 10:30

  5. core-ci voted on patch set 4 V -1 08/21/24, 10:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63896

  6. core-ci voted on patch set 4 V +1 08/21/24, 11:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63896

  7. Oliver Hader voted on patch set 4 CR +1 V +1 08/27/24, 07:11

  8. Marc Willmann commented on patch set 4 08/27/24, 08:08

    Reply

    sounds good to me. This will solve the problem, that the "autogenerated-xxxx" config names which are generated by TYPO3 itself are larger than 32bytes, but smaller than 190. Only thing is that it's inconsistent with the 'sys_csp_resolution' table, see #102404. But that's no blocker for me.
  9. Benjamin Franzke commented on patch set 4 08/27/24, 08:14

    According to https://forge.typo3.org/issues/104431 v12 is aslo affected. Backport?
  10. Oliver Hader commented on patch set 4 08/27/24, 09:03

    Reply

    Back-porting would be great from my POV. I'm not sure how we handled database changes to stable branches in the past...
  11. Christian Kuhn commented on patch set 4 08/27/24, 09:35

    Reply

    increasing field sizes in stable branches isn't a huge deal. would be ok if we wish.
  12. Garvin Hicking commented on patch set 4 08/27/24, 09:38

    Reply

    The combined index will however exceed the 767 chars then, can that be an issue with mb4 mariadb/mysql innodb aetups?
  13. Oliver Hader commented on patch set 4 09/03/24, 12:43

    Reply

    I'm not much into this topic... what would you suggest? * type: 32 bytes * status: 2 bytes * scope: tbd * summary: 40 bytes * request_time: 8 bytes → `767/4 - 32 - 2 - 40 - 8 = 109,75` Thus, would be `100` better for the `scope` column?
  14. Oliver Hader commented on patch set 5 CR +1 V +1 09/03/24, 12:44

    Published edit on patch set 4.
  15. core-ci voted on patch set 5 V +1 09/03/24, 13:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64666

  16. Garvin Hicking commented on patch set 5 09/03/24, 13:04

    Reply

    IMO that "100" would be the safer bet, yes. I just notice, sys_cp_resolution currently has a scope=264 length, but they both seem to apply to the same content. But shrinking a field could have data truncation (if anyone altered their contents somehow), so I'd suggest to keep those two definitious out of sync.
  17. Oliver Hader commented on patch set 5 09/03/24, 13:13

    Reply

    Hm, `264` happened in https://review.typo3.org/c/Packages/TYPO3.CMS/+/81794 In order to have resolutions, it actually would have required the report first. So, I'm not sure why/how that worked in the change above without touching `sys_http_report`.
  18. Garvin Hicking updated the commit message in patch set 6 V +1 09/03/24, 13:38

  19. Garvin Hicking commented on patch set 6 CR +1 V +1 09/03/24, 13:41

    Reply

    I can only imagine the sys_http_report table was unknowingly already expanded and thus not noticed. Voting now for this patch at 100, to be conservative and least-breaking while still improving the situation for some "normal-length" identifiere.
  20. core-ci voted on patch set 6 V +1 09/03/24, 13:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64669

  21. Oliver Hader voted on patch set 6 CR +1 V +1 09/03/24, 18:07

  22. Oliver Hader commented on patch set 6 09/03/24, 18:08

    Reply

    Done
  23. Oliver Hader commented on patch set 6 09/03/24, 18:11

    Reply

    `autogenerated-109-2723d092b63885e0d7c260cc007e8b9d` is around 50 chars... depending on the page-id - but still should be fine here.
  24. Stefan Bürk voted on patch set 6 CR +2 V +2 09/13/24, 21:07

  25. Stefan Bürk merged patch set 7 09/13/24, 21:08