Project

General

Profile

Actions

Bug #78596

closed

Deleting a page tree (and causing cache flush by tags) hammers the cache

Added by Claus Due about 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2016-11-07
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Because of the way the cache backend is constructed, flushing the cache by tag name is only possible one tag at a time. This then causes potentially thousands of SQL requests to flush each individual cache. The problem is particularly pronounced in the deletion of page trees because this collects affected page IDs, creates a list of tags - and then iterates this list one by one to flush each cache. It does this twice.

Rather than force consumers to iterate and call to flush each individual cache we can allow passing an array as tag-to-clear. When done this way we can turn the list of tags into a CSV list fitting for an `IN` SQL query which brings the number of SQL queries to flush any number of tags, back down to one (for MySQL; two for other DB backends).

The CacheManager already does not enforce a string value for $tag which means the change is minimal.

The problem exists on 7.6 and master alike. Marked as bug since it impacts performance by more than 10% when deleting a page tree with ~200 pages and related records total; much more so with remote SQL connections.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #86952: flushByTags() is using a all in one , slow mysql commandClosed2018-11-20

Actions
Actions #1

Updated by Gerrit Code Review about 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50529

Actions #2

Updated by Gerrit Code Review about 8 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50530

Actions #3

Updated by Gerrit Code Review about 8 years ago

Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50530

Actions #4

Updated by Gerrit Code Review about 8 years ago

Patch set 3 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50530

Actions #5

Updated by Gerrit Code Review about 8 years ago

Patch set 4 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50530

Actions #6

Updated by Gerrit Code Review about 8 years ago

Patch set 5 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50530

Actions #7

Updated by Gerrit Code Review about 8 years ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #8

Updated by Gerrit Code Review about 8 years ago

Patch set 6 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50530

Actions #9

Updated by Gerrit Code Review about 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #10

Updated by Gerrit Code Review about 8 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #11

Updated by Gerrit Code Review about 8 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #12

Updated by Gerrit Code Review about 8 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #13

Updated by Gerrit Code Review about 8 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #14

Updated by Gerrit Code Review about 8 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #15

Updated by Gerrit Code Review about 8 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #16

Updated by Gerrit Code Review about 8 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #17

Updated by Gerrit Code Review about 8 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #18

Updated by Gerrit Code Review about 8 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #19

Updated by Gerrit Code Review about 8 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #20

Updated by Gerrit Code Review about 8 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #21

Updated by Gerrit Code Review about 8 years ago

Patch set 7 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50530

Actions #22

Updated by Gerrit Code Review about 8 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #23

Updated by Gerrit Code Review almost 8 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #24

Updated by Gerrit Code Review almost 8 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #25

Updated by Gerrit Code Review almost 8 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #26

Updated by Gerrit Code Review almost 8 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #27

Updated by Gerrit Code Review almost 8 years ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #28

Updated by Gerrit Code Review almost 8 years ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #29

Updated by Gerrit Code Review almost 8 years ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #30

Updated by Gerrit Code Review almost 8 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50785

Actions #31

Updated by Gerrit Code Review almost 8 years ago

Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #32

Updated by Gerrit Code Review almost 8 years ago

Patch set 23 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50537

Actions #33

Updated by Anonymous almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #34

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions #35

Updated by Oliver Hader over 1 year ago

  • Related to Bug #86952: flushByTags() is using a all in one , slow mysql command added
Actions

Also available in: Atom PDF