Review main Merged

81434[BUGFIX] Mitigate MySQL limitations in `ReferenceIndex`

Stefan Bürk CR +2 V +2 Normal +61 −25 updated 10/16/23, 14:38

Commit message

With #102171 a sub-query is used to fetch the records
to delete. We missed two things:

* Placeholders in the sub-query need to use the 'parent'
  QueryBuilder instance.

* MySQL is picky and disallows using the same table from
  the delete query in a sub-query, at least not directly.

This change adds an additional, chunked query to the mix,
to mitigate picky MySQL and takes care of correct
placeholder handling.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Markus Klein +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 1830

Show 35 earlier messages
  1. Stefan Bürk uploaded patch set 1 10/16/23, 06:01

  2. Markus Klein updated the commit message in patch set 2 10/16/23, 06:14

  3. core-ci voted on patch set 1 V -1 10/16/23, 06:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47801

  4. core-ci voted on patch set 2 V -1 10/16/23, 06:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47802

  5. Stefan Bürk updated the commit message in patch set 3 V -1 10/16/23, 06:32

  1. core-ci voted on patch set 3 V -1 10/16/23, 06:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47804

  2. Garvin Hicking uploaded patch set 4 V -1 10/16/23, 08:57

  3. Garvin Hicking commented on patch set 4 10/16/23, 08:59

    Had limited time, but implemented a change that uses chunked retrieval of the records to be deleted. It worked on a test and actual run on my instance, but needs further verification/discussion. Problem is that we cannot properly use a sub-select here, because the MySQL query optimizer really prevents writing to data that is also being fetched. Since a UID list could possibly get very large, a chunked iteration has been implemented (for me, that allows 65.535 records in one go)
  4. core-ci voted on patch set 4 V +1 10/16/23, 09:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47808

  5. Christian Kuhn uploaded patch set 5 V +1 10/16/23, 10:20

  6. core-ci voted on patch set 5 V +1 10/16/23, 10:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47812

  7. Christian Kuhn uploaded patch set 6 V +1 10/16/23, 10:27

  8. core-ci voted on patch set 6 V +1 10/16/23, 10:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47813

  9. Christian Kuhn uploaded patch set 7 V +1 10/16/23, 10:41

  10. Christian Kuhn updated the commit message in patch set 8 10/16/23, 10:42

  11. core-ci voted on patch set 8 V +1 10/16/23, 10:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47816

  12. Christian Kuhn uploaded patch set 9 V +1 10/16/23, 10:59

  13. Christian Kuhn uploaded patch set 10 10/16/23, 11:07

  14. core-ci voted on patch set 9 V +1 10/16/23, 11:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47817

  15. Christian Kuhn uploaded patch set 11 10/16/23, 11:12

  16. core-ci voted on patch set 10 V +1 10/16/23, 11:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47820

  17. core-ci voted on patch set 11 V +1 10/16/23, 11:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47821

  18. Garvin Hicking commented on patch set 11 V +1 CR +1 10/16/23, 11:50

    Works in my instance (mariadb; but the current implementation should work across all RDBMS). The changes/optimizations are great. I love when OpenSource works, that was a cool group effort, thanks for letting me be a part of it and learn. :-)
  19. Markus Klein voted on patch set 11 CR +1 10/16/23, 12:14

  20. Stefan Bürk commented on patch set 11 CR -1 10/16/23, 12:17

    let us the nightly run on it ....
  21. core-ci voted on patch set 11 V -1 10/16/23, 12:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47822

  22. core-ci voted on patch set 11 V +1 10/16/23, 13:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47822

  23. Stefan Bürk voted on patch set 11 V +1 CR +1 10/16/23, 14:26

  24. Christian Kuhn voted on patch set 11 V +2 CR +2 10/16/23, 14:38

  25. Christian Kuhn merged patch set 12 10/16/23, 14:38